Skip to content

Commit 2364b11

Browse files
committed
reorder includes to compile on OpenBSD
From getifaddr(3) manual: "If both <net/if.h> and <ifaddrs.h> are being included, <net/if.h> must be included before <ifaddrs.h>" http://www.openbsd.org/cgi-bin/man.cgi?query=getifaddrs&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=i386&format=html
1 parent 3e7dac9 commit 2364b11

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/compat.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@
2828
#include <windows.h>
2929
#include <ws2tcpip.h>
3030
#else
31+
#include <sys/fcntl.h>
32+
#include <sys/mman.h>
33+
#include <sys/socket.h>
3134
#include <sys/types.h>
35+
#include <net/if.h>
36+
#include <netinet/in.h>
3237
#include <arpa/inet.h>
3338
#include <ifaddrs.h>
3439
#include <limits.h>
35-
#include <net/if.h>
3640
#include <netdb.h>
37-
#include <netinet/in.h>
38-
#include <sys/fcntl.h>
39-
#include <sys/mman.h>
40-
#include <sys/socket.h>
4141
#include <unistd.h>
4242
#endif
4343

0 commit comments

Comments
 (0)