Skip to content

Commit 34dfe60

Browse files
committed
fixup flags
Signed-off-by: tison <[email protected]>
1 parent 718519c commit 34dfe60

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

changelog/2537.added.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Add support for `syslog`, `openlog`, `closelog` on `macos`.
1+
Add support for `syslog`, `openlog`, `closelog` on all `unix`.

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ feature! {
202202
pub mod spawn;
203203
}
204204

205-
#[cfg(unix)]
206205
feature! {
207206
#![feature = "syslog"]
208207
pub mod syslog;

test/test.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ mod test_sendfile;
4242
))]
4343
mod test_spawn;
4444

45-
#[cfg(unix)]
4645
mod test_syslog;
4746

4847
mod test_time;

test/test_syslog.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ use nix::syslog::{openlog, syslog, Facility, LogFlags, Severity};
22

33
#[test]
44
fn test_syslog_hello_world() {
5-
openlog(None::<&str>, LogFlags::LOG_PID, Facility::LOG_USER).unwrap();
5+
#[cfg(not(target_os = "haiku"))]
6+
let flags = LogFlags::LOG_PID;
7+
#[cfg(target_os = "haiku")]
8+
let flags = LogFlags::empty();
9+
10+
openlog(None::<&str>, flags, Facility::LOG_USER).unwrap();
611
syslog(Severity::LOG_EMERG, "Hello, nix!").unwrap();
712

813
let name = "syslog";

0 commit comments

Comments
 (0)