blob: 17d3ba3bb7251c77fd57655778470893a114b93c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
diff --git a/src/system.h b/src/system.h
index 6ddf98c..3efef6a 100644
--- a/src/system.h
+++ b/src/system.h
@@ -117,27 +117,6 @@
#include <inttypes.h>
#endif
-#if defined(__linux__)
-#include <asm/types.h>
-#include <linux/if.h>
-#include <linux/if_packet.h>
-#include <linux/if_ether.h>
-#include <linux/if_tun.h>
-#include <linux/netlink.h>
-#include <linux/rtnetlink.h>
-#ifndef HAVE_SYS_UN_H
-#include <linux/un.h>
-#endif
-
-#ifdef HAVE_SYS_SYSINFO_H
-#include <sys/sysinfo.h>
-#else
-#ifdef HAVE_LINUX_SYSINFO_H
-#define _LINUX_KERNEL_H
-#include <linux/sysinfo.h>
-#endif
-#endif
-
#elif defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__)
#include <net/if.h>
#include <net/bpf.h>
@@ -244,6 +223,27 @@
#include <unistd.h>
#include <errno.h>
+#if defined(__linux__)
+#include <asm/types.h>
+#include <linux/if.h>
+#include <linux/if_packet.h>
+#include <linux/if_ether.h>
+#include <linux/if_tun.h>
+#include <linux/netlink.h>
+#include <linux/rtnetlink.h>
+#ifndef HAVE_SYS_UN_H
+#include <linux/un.h>
+#endif
+
+#ifdef HAVE_SYS_SYSINFO_H
+#include <sys/sysinfo.h>
+#else
+#ifdef HAVE_LINUX_SYSINFO_H
+#define _LINUX_KERNEL_H
+#include <linux/sysinfo.h>
+#endif
+#endif
+
int safe_accept(int fd, struct sockaddr *sa, socklen_t *lenptr);
int safe_select(int nfds, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds, struct timeval *timeout);
|