Skip to content

Commit b51af46

Browse files
cmusserThomasdezeeuw
authored andcommitted
DragonFlyBSD: refine kqueue-related types and values
- Make sure that Filter and Flag types are defined. The sizes for these kevent fields are the same as on FreeBSD and OpenBSD - Don't define the NOTE_BACKGROUND EVFILT_TIMER flag. This flag value is exclusive to Apple platforms.
1 parent 542fec1 commit b51af46

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sys/unix/selector/kqueue.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ type Count = libc::c_int;
1919
type Count = libc::size_t;
2020

2121
// Type of the `filter` field in the `kevent` structure.
22-
#[cfg(any(target_os = "freebsd", target_os = "openbsd"))]
22+
#[cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))]
2323
type Filter = libc::c_short;
2424
#[cfg(any(target_os = "macos", target_os = "ios"))]
2525
type Filter = i16;
2626
#[cfg(target_os = "netbsd")]
2727
type Filter = u32;
2828

2929
// Type of the `flags` field in the `kevent` structure.
30-
#[cfg(any(target_os = "freebsd", target_os = "openbsd"))]
30+
#[cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))]
3131
type Flags = libc::c_ushort;
3232
#[cfg(any(target_os = "macos", target_os = "ios"))]
3333
type Flags = u16;
@@ -651,7 +651,7 @@ pub mod event {
651651
libc::NOTE_LEEWAY,
652652
#[cfg(any(target_os = "ios", target_os = "macos"))]
653653
libc::NOTE_CRITICAL,
654-
#[cfg(any(target_os = "dragonfly"))]
654+
#[cfg(any(target_os = "ios", target_os = "macos"))]
655655
libc::NOTE_BACKGROUND,
656656
);
657657

0 commit comments

Comments
 (0)