summaryrefslogtreecommitdiffstats
path: root/vendor/libc/src/unix/linux_like/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/libc/src/unix/linux_like/mod.rs')
-rw-r--r--vendor/libc/src/unix/linux_like/mod.rs34
1 files changed, 28 insertions, 6 deletions
diff --git a/vendor/libc/src/unix/linux_like/mod.rs b/vendor/libc/src/unix/linux_like/mod.rs
index e2e73b330..db5774596 100644
--- a/vendor/libc/src/unix/linux_like/mod.rs
+++ b/vendor/libc/src/unix/linux_like/mod.rs
@@ -108,13 +108,13 @@ s! {
pub struct sched_param {
pub sched_priority: ::c_int,
- #[cfg(any(target_env = "musl", target_os = "emscripten"))]
+ #[cfg(any(target_env = "musl", target_os = "emscripten", target_env = "ohos"))]
pub sched_ss_low_priority: ::c_int,
- #[cfg(any(target_env = "musl", target_os = "emscripten"))]
+ #[cfg(any(target_env = "musl", target_os = "emscripten", target_env = "ohos"))]
pub sched_ss_repl_period: ::timespec,
- #[cfg(any(target_env = "musl", target_os = "emscripten"))]
+ #[cfg(any(target_env = "musl", target_os = "emscripten", target_env = "ohos"))]
pub sched_ss_init_budget: ::timespec,
- #[cfg(any(target_env = "musl", target_os = "emscripten"))]
+ #[cfg(any(target_env = "musl", target_os = "emscripten", target_env = "ohos"))]
pub sched_ss_max_repl: ::c_int,
}
@@ -557,7 +557,21 @@ pub const XATTR_CREATE: ::c_int = 0x1;
pub const XATTR_REPLACE: ::c_int = 0x2;
cfg_if! {
- if #[cfg(not(target_env = "uclibc"))] {
+ if #[cfg(target_env = "ohos")] {
+ pub const LC_CTYPE: ::c_int = 0;
+ pub const LC_NUMERIC: ::c_int = 1;
+ pub const LC_TIME: ::c_int = 2;
+ pub const LC_COLLATE: ::c_int = 3;
+ pub const LC_MONETARY: ::c_int = 4;
+ pub const LC_MESSAGES: ::c_int = 5;
+ pub const LC_PAPER: ::c_int = 6;
+ pub const LC_NAME: ::c_int = 7;
+ pub const LC_ADDRESS: ::c_int = 8;
+ pub const LC_TELEPHONE: ::c_int = 9;
+ pub const LC_MEASUREMENT: ::c_int = 10;
+ pub const LC_IDENTIFICATION: ::c_int = 11;
+ pub const LC_ALL: ::c_int = 12;
+ } else if #[cfg(not(target_env = "uclibc"))] {
pub const LC_CTYPE: ::c_int = 0;
pub const LC_NUMERIC: ::c_int = 1;
pub const LC_TIME: ::c_int = 2;
@@ -973,7 +987,11 @@ pub const TCP_QUICKACK: ::c_int = 12;
pub const TCP_CONGESTION: ::c_int = 13;
pub const TCP_MD5SIG: ::c_int = 14;
cfg_if! {
- if #[cfg(all(target_os = "linux", any(target_env = "gnu", target_env = "musl")))] {
+ if #[cfg(all(target_os = "linux", any(
+ target_env = "gnu",
+ target_env = "musl",
+ target_env = "ohos"
+ )))] {
// WARN: deprecated
pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
}
@@ -1006,6 +1024,7 @@ cfg_if! {
pub const TCP_CM_INQ: ::c_int = TCP_INQ;
// NOTE: Some CI images doesn't have this option yet.
// pub const TCP_TX_DELAY: ::c_int = 37;
+ pub const TCP_MD5SIG_MAXKEYLEN: usize = 80;
}
}
@@ -1201,6 +1220,7 @@ pub const AT_REMOVEDIR: ::c_int = 0x200;
pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400;
pub const AT_NO_AUTOMOUNT: ::c_int = 0x800;
pub const AT_EMPTY_PATH: ::c_int = 0x1000;
+pub const AT_RECURSIVE: ::c_int = 0x8000;
pub const LOG_CRON: ::c_int = 9 << 3;
pub const LOG_AUTHPRIV: ::c_int = 10 << 3;
@@ -1782,6 +1802,8 @@ extern "C" {
pub fn sendmsg(fd: ::c_int, msg: *const ::msghdr, flags: ::c_int) -> ::ssize_t;
pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int) -> ::ssize_t;
pub fn uname(buf: *mut ::utsname) -> ::c_int;
+
+ pub fn strchrnul(s: *const ::c_char, c: ::c_int) -> *mut ::c_char;
}
cfg_if! {