wired: Silence sparse warning on redefinition of IFNAMSIZ

driver_wired.c pulls in utils/common.h before net/if.h as a workaround
for NetBSD build. This results in IFNAMSIZ getting redefined and sparse
warning about this. Silence that warning by undefining the IFNAMSIZ
definition from common.h to allow the one from net/if.h being used. In
addition, remove duplicated inclusion of net/if.h.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2016-06-24 17:36:17 +03:00
parent 82ffcba755
commit 2f13e54dfc

View file

@ -14,11 +14,11 @@
#include "driver.h" #include "driver.h"
#include <sys/ioctl.h> #include <sys/ioctl.h>
#undef IFNAMSIZ
#include <net/if.h> #include <net/if.h>
#ifdef __linux__ #ifdef __linux__
#include <netpacket/packet.h> #include <netpacket/packet.h>
#include <net/if_arp.h> #include <net/if_arp.h>
#include <net/if.h>
#endif /* __linux__ */ #endif /* __linux__ */
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__) #if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
#include <net/if_dl.h> #include <net/if_dl.h>