commit 7cbd61ddc4d745d59dc5644c8a9d1c3c1c369b08 Author: Aaron LI Date: Thu Jul 6 15:56:36 2017 +0800 Fix build on DragonFly BSD * With this fix, I can successfully build `ocserv-0.11.8` on DragonFly BSD (4.9-DEVELOPMENT) using the `net/ocserv` port from FreeBSD [1] without any further modifications. * I didn't test its functionaliies on DragonFly BSD yet. [1] https://github.com/freebsd/freebsd-ports/tree/master/net/ocserv diff --git a/src/tun.c b/src/tun.c index 7e714094..1ecc5c13 100644 --- a/src/tun.c +++ b/src/tun.c @@ -48,13 +48,16 @@ #include #include -#if defined(__FreeBSD__) || defined(__OpenBSD__) +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) # include # include #endif #if defined(__OpenBSD__) # include #endif +#if defined(__DragonFly__) +# include +#endif #ifdef __linux__ @@ -691,7 +694,7 @@ static void reset_ipv4_addr(struct proc_st *proc) if (proc->ipv4 == NULL || proc->ipv4->lip_len == 0) return; - + #if defined(SIOCDIFADDR) && !defined(__linux__) fd = socket(AF_INET, SOCK_DGRAM, 0);