Skip to content

Commit

Permalink
test on unix
Browse files Browse the repository at this point in the history
Signed-off-by: tison <[email protected]>
  • Loading branch information
tisonkun committed Nov 16, 2024
1 parent 584e4df commit 718519c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ feature! {
pub mod spawn;
}

#[cfg(any(linux, macos))]
#[cfg(unix)]
feature! {
#![feature = "syslog"]
pub mod syslog;
Expand Down
5 changes: 5 additions & 0 deletions src/syslog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,25 @@ libc_bitflags! {
pub struct LogFlags: libc::c_int {
/// Log the process id with each message: useful for identifying instantiations of
/// daemons.
#[cfg(not(target_os = "haiku"))]
LOG_PID;
/// If syslog() cannot pass the message to syslogd(8) it will attempt to write the
/// message to the console ("/dev/console").
#[cfg(not(target_os = "haiku"))]
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.
#[cfg(not(target_os = "haiku"))]
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.
#[cfg(not(target_os = "haiku"))]
LOG_NDELAY;
/// Write the message to standard error output as well to the system log.
#[cfg(not(target_os = "haiku"))]
LOG_PERROR;
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ mod test_sendfile;
))]
mod test_spawn;

#[cfg(any(linux, macos))]
#[cfg(unix)]
mod test_syslog;

mod test_time;
Expand Down

0 comments on commit 718519c

Please sign in to comment.