summaryrefslogtreecommitdiff
path: root/src/unix/mod.rs
diff options
context:
space:
mode:
authorNiels Sascha Reedijk <niels.reedijk@gmail.com>2021-01-28 14:12:49 +0000
committerNiels Sascha Reedijk <niels.reedijk@gmail.com>2021-01-28 14:31:24 +0000
commit813d7d839b66eb1b0cc89cdcb5f00bb9b9219769 (patch)
tree9c1a6a4c830b072ea4270e6b9c2316c797f6ee29 /src/unix/mod.rs
parent497f7f40f7fae36ac5e42649c8ed457edea74b70 (diff)
downloadrust-libc-813d7d839b66eb1b0cc89cdcb5f00bb9b9219769.tar.gz
Haiku: fix various issues pointed out by the automated tests
No changes to other platforms.
Diffstat (limited to 'src/unix/mod.rs')
-rw-r--r--src/unix/mod.rs18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index 51c19ca5d7..daea05c55f 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -227,7 +227,8 @@ pub const S_ISGID: ::mode_t = 0x400;
pub const S_ISVTX: ::mode_t = 0x200;
cfg_if! {
- if #[cfg(not(any(target_os = "illumos", target_os = "solaris")))] {
+ if #[cfg(not(any(target_os = "haiku", target_os = "illumos",
+ target_os = "solaris")))] {
pub const IF_NAMESIZE: ::size_t = 16;
pub const IFNAMSIZ: ::size_t = IF_NAMESIZE;
}
@@ -260,12 +261,15 @@ pub const LOG_LOCAL5: ::c_int = 21 << 3;
pub const LOG_LOCAL6: ::c_int = 22 << 3;
pub const LOG_LOCAL7: ::c_int = 23 << 3;
-pub const LOG_PID: ::c_int = 0x01;
-pub const LOG_CONS: ::c_int = 0x02;
-pub const LOG_ODELAY: ::c_int = 0x04;
-pub const LOG_NDELAY: ::c_int = 0x08;
-pub const LOG_NOWAIT: ::c_int = 0x10;
-
+cfg_if! {
+ if #[cfg(not(target_os = "haiku"))] {
+ pub const LOG_PID: ::c_int = 0x01;
+ pub const LOG_CONS: ::c_int = 0x02;
+ pub const LOG_ODELAY: ::c_int = 0x04;
+ pub const LOG_NDELAY: ::c_int = 0x08;
+ pub const LOG_NOWAIT: ::c_int = 0x10;
+ }
+}
pub const LOG_PRIMASK: ::c_int = 7;
pub const LOG_FACMASK: ::c_int = 0x3f8;