netdev-linux: Fix broken build on RHEL 6.
authorBen Pfaff <blp@nicira.com>
Thu, 22 Sep 2011 18:54:22 +0000 (11:54 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 22 Sep 2011 18:54:22 +0000 (11:54 -0700)
Commit 00fa9d37c2b "Do not include net/ethernet.h and linux/if_tunnel.h"
introduced a compile error on RHEL 6:

lib/netdev-linux.c: In function 'netdev_linux_listen':
lib/netdev-linux.c:734: error: 'ETH_P_ALL' undeclared (first use in this
function)

This fixes the problem.

I verified that the Android NDK r6b mentioned in the previous commit
contains a file named android-ndk-r6b/platforms/android-3/arch-x86/use/
linux/if_ether.h that defines ETH_P_ALL.  I didn't try building on that
platform.

lib/netdev-linux.c

index 5bdb963..c49df8a 100644 (file)
@@ -24,6 +24,7 @@
 #include <arpa/inet.h>
 #include <inttypes.h>
 #include <linux/gen_stats.h>
+#include <linux/if_ether.h>
 #include <linux/if_tun.h>
 #include <linux/ip.h>
 #include <linux/types.h>