Fix compilation on DragonFlyBSD
This commit is contained in:
parent
97b154048d
commit
e062e44f1c
|
@ -8,6 +8,7 @@ module eventcore.drivers.posix.kqueue;
|
|||
@safe: /*@nogc:*/ nothrow:
|
||||
|
||||
version (FreeBSD) enum have_kqueue = true;
|
||||
else version (DragonFlyBSD) enum have_kqueue = true;
|
||||
else version (OSX) enum have_kqueue = true;
|
||||
else enum have_kqueue = false;
|
||||
|
||||
|
@ -21,6 +22,7 @@ import core.sys.posix.sys.time : timespec, time_t;
|
|||
|
||||
version (OSX) import core.sys.darwin.sys.event;
|
||||
else version (FreeBSD) import core.sys.freebsd.sys.event;
|
||||
else version (DragonFlyBSD) import core.sys.dragonflybsd.sys.event;
|
||||
else static assert(false, "Kqueue not supported on this OS.");
|
||||
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ version (Posix) {
|
|||
{
|
||||
version (linux) enum O_CLOEXEC = 0x80000;
|
||||
else version (FreeBSD) enum O_CLOEXEC = 0x100000;
|
||||
else version (DragonFlyBSD) enum O_CLOEXEC = 0x0020000;
|
||||
else version (NetBSD) enum O_CLOEXEC = 0x400000;
|
||||
else version (OpenBSD) enum O_CLOEXEC = 0x10000;
|
||||
else version (OSX) enum O_CLOEXEC = 0x1000000;
|
||||
|
@ -57,6 +58,12 @@ version(FreeBSD) {
|
|||
enum IP_MULTICAST_LOOP = 11;
|
||||
} else import core.sys.freebsd.netinet.in_ : IP_ADD_MEMBERSHIP, IP_MULTICAST_LOOP;
|
||||
}
|
||||
version(DragonFlyBSD) {
|
||||
static if (__VERSION__ < 2077) {
|
||||
enum IP_ADD_MEMBERSHIP = 12;
|
||||
enum IP_MULTICAST_LOOP = 11;
|
||||
} else import core.sys.dragonflybsd.netinet.in_ : IP_ADD_MEMBERSHIP, IP_MULTICAST_LOOP;
|
||||
}
|
||||
version (Solaris) {
|
||||
enum IP_ADD_MEMBERSHIP = 0x13;
|
||||
enum IP_MULTICAST_LOOP = 0x12;
|
||||
|
|
Loading…
Reference in a new issue