Skip to content

Commit

Permalink
fixup flags
Browse files Browse the repository at this point in the history
Signed-off-by: tison <wander4096@gmail.com>
  • Loading branch information
tisonkun committed Nov 16, 2024
1 parent 718519c commit 34dfe60
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion changelog/2537.added.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Add support for `syslog`, `openlog`, `closelog` on `macos`.
Add support for `syslog`, `openlog`, `closelog` on all `unix`.
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ feature! {
pub mod spawn;
}

#[cfg(unix)]
feature! {
#![feature = "syslog"]
pub mod syslog;
Expand Down
1 change: 0 additions & 1 deletion test/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ mod test_sendfile;
))]
mod test_spawn;

#[cfg(unix)]
mod test_syslog;

mod test_time;
Expand Down
7 changes: 6 additions & 1 deletion test/test_syslog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ use nix::syslog::{openlog, syslog, Facility, LogFlags, Severity};

#[test]
fn test_syslog_hello_world() {
openlog(None::<&str>, LogFlags::LOG_PID, Facility::LOG_USER).unwrap();
#[cfg(not(target_os = "haiku"))]
let flags = LogFlags::LOG_PID;
#[cfg(target_os = "haiku")]
let flags = LogFlags::empty();

openlog(None::<&str>, flags, Facility::LOG_USER).unwrap();
syslog(Severity::LOG_EMERG, "Hello, nix!").unwrap();

let name = "syslog";
Expand Down

0 comments on commit 34dfe60

Please sign in to comment.