diff --git a/src/lib.rs b/src/lib.rs index 3e976d8ab0..302cbf955f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -202,7 +202,7 @@ feature! { pub mod spawn; } -#[cfg(target_os = "macos")] +#[cfg(any(linux, macos))] feature! { #![feature = "syslog"] pub mod syslog; diff --git a/src/syslog.rs b/src/syslog.rs index 12a3d5b324..b0a37fc18a 100644 --- a/src/syslog.rs +++ b/src/syslog.rs @@ -96,6 +96,11 @@ libc_bitflags! { /// If syslog() cannot pass the message to syslogd(8) it will attempt to write the /// message to the console ("/dev/console"). LOG_CONS; + /// The converse of [`LOG_NDELAY`][LogFlags::LOG_NDELAY]; opening of the connection is + /// delayed until `syslog` is called. + /// + /// This is the default, and need not be specified. + LOG_ODELAY; /// Open the connection to syslogd(8) immediately. Normally the open is delayed until /// the first message is logged. Useful for programs that need to manage the order in /// which file descriptors are allocated. diff --git a/test/test.rs b/test/test.rs index 98923c2ee6..4e6457573e 100644 --- a/test/test.rs +++ b/test/test.rs @@ -42,7 +42,7 @@ mod test_sendfile; ))] mod test_spawn; -#[cfg(target_os = "macos")] +#[cfg(any(linux, macos))] mod test_syslog; mod test_time;