diff options
author | Christopher Ferris <cferris@google.com> | 2014-09-03 20:17:53 -0700 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2014-09-04 17:58:44 -0700 |
commit | 0c9f91efb3e5d44a35a9d3559d8070520c55de08 (patch) | |
tree | a793d6ea79c9bb62966a4cd47a35d6d1b2fd9858 | |
parent | e8ef8a0962dfd5d4cc0c2a45e5ea30042ee11843 (diff) | |
download | android_external_dhcpcd-0c9f91efb3e5d44a35a9d3559d8070520c55de08.tar.gz android_external_dhcpcd-0c9f91efb3e5d44a35a9d3559d8070520c55de08.tar.bz2 android_external_dhcpcd-0c9f91efb3e5d44a35a9d3559d8070520c55de08.zip |
Move check of IFF_LOWER_UP after all includes.
The latest uapi kernel headers use an enum for values such as
IFF_LOWER_UP. This code defines IFF_LOWER_UP and causes the inclusion
of if.h later on to mess up the enum definition.
Move the IFF_LOWER_UP check after all of the includes.
Change-Id: I9d9ce63a63bb6fc82a2424776f5aa6700cc34239
-rw-r--r-- | if-linux.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -40,13 +40,6 @@ # 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 <ctype.h> #include <stddef.h> @@ -61,6 +54,15 @@ #include "dhcp.h" #include "net.h" +/* ANDROID change, moved this below all includes. */ +/* 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 +/* End of ANDROID change */ + static int sock_fd; static struct sockaddr_nl sock_nl; |