Fix compilation on DragonFlyBSD

This commit is contained in:
Diederik de Groot 2018-01-09 15:23:23 +01:00
parent 97b154048d
commit e062e44f1c
No known key found for this signature in database
GPG key ID: AFA728250A1BECD6
2 changed files with 9 additions and 0 deletions

View file

@ -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;