]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Move defines checks after all includes to make Android happy.
authorRoy Marples <roy@marples.name>
Tue, 8 Sep 2015 08:33:52 +0000 (08:33 +0000)
committerRoy Marples <roy@marples.name>
Tue, 8 Sep 2015 08:33:52 +0000 (08:33 +0000)
if-linux.c

index a28f86eb1ba521601a962efb9610188ecef4c436..2b94b59a728267a53e30191bbe6eb021ff078dd1 100644 (file)
 #include <netinet/in.h>
 #include <net/route.h>
 
-/* Support older kernels */
-#ifndef IFLA_WIRELESS
-# define IFLA_WIRELESS (IFLA_MASTER + 1)
-#endif
-
-/* For some reason, glibc doesn't include newer flags from linux/if.h
- * However, we cannot include linux/if.h directly as it conflicts
- * with the glibc version. D'oh! */
-#ifndef IFF_LOWER_UP
-#define IFF_LOWER_UP   0x10000         /* driver signals L1 up         */
-#endif
-
 #include <errno.h>
 #include <fcntl.h>
 #include <ctype.h>
 #endif
 int if_getssid_wext(const char *ifname, uint8_t *ssid);
 
+/* Support older kernels */
+#ifndef IFLA_WIRELESS
+#define IFLA_WIRELESS (IFLA_MASTER + 1)
+#endif
+
+/* For some reason, glibc doesn't include newer flags from linux/if.h
+ * However, we cannot include linux/if.h directly as it conflicts
+ * with the glibc version. D'oh! */
+#ifndef IFF_LOWER_UP
+#define IFF_LOWER_UP   0x10000         /* driver signals L1 up         */
+#endif
+
 #define bpf_insn               sock_filter
 #define BPF_SKIPTYPE
 #define BPF_ETHCOOK            -ETH_HLEN