Fix preprocessor logic for ethernet header choice.

Checking for netinet/if_ether.h and netinet/ip6.h depended
on including other headers first; observed when trying to
build on FreeBSD.

ARP.h was changed to conform to CMake style config.h generation.
Definitions are not set to 1 like with autotools, so we have
to check for definition, not just that the value is true.
This commit is contained in:
Jon Siwek 2010-11-01 10:05:23 -05:00
parent 43cbe2a9fc
commit bea41f5c73
2 changed files with 7 additions and 5 deletions

View file

@ -13,9 +13,9 @@
#include <net/if_arp.h>
#ifdef HAVE_NET_ETHERNET_H
#include <net/ethernet.h>
#elif HAVE_SYS_ETHERNET_H
#elif defined(HAVE_SYS_ETHERNET_H)
#include <sys/ethernet.h>
#elif HAVE_NETINET_IF_ETHER_H
#elif defined(HAVE_NETINET_IF_ETHER_H)
#include <netinet/if_ether.h>
#endif