From b2befd5bb2db811ac0273bc52be158d3476a5ff7 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 6 Nov 2017 14:42:32 -0800 Subject: sparse: Add guards to prevent FreeBSD-incompatible #include order. FreeBSD insists that be included before and that be included before . This adds guards to the "sparse" headers to yield a warning if this order is violated. This commit also adjusts the order of many #includes to suit this requirement. Signed-off-by: Ben Pfaff Acked-by: Justin Pettit --- lib/lldp/lldpd-structs.h | 4 +--- lib/lldp/lldpd.c | 3 ++- lib/lldp/lldpd.h | 4 +--- 3 files changed, 4 insertions(+), 7 deletions(-) (limited to 'lib/lldp') diff --git a/lib/lldp/lldpd-structs.h b/lib/lldp/lldpd-structs.h index 15e5ce8fa..6a3ffb8d3 100644 --- a/lib/lldp/lldpd-structs.h +++ b/lib/lldp/lldpd-structs.h @@ -20,11 +20,9 @@ #define _LLDPD_STRUCTS_H #include -#ifndef _WIN32 +#include #include -#endif #include -#include #include "aa-structs.h" #include "lldp-const.h" #include "packets.h" diff --git a/lib/lldp/lldpd.c b/lib/lldp/lldpd.c index e9d1cf18e..ff5e62846 100644 --- a/lib/lldp/lldpd.c +++ b/lib/lldp/lldpd.c @@ -18,6 +18,8 @@ #include #include "lldpd.h" +#include +#include #include #include #include @@ -28,7 +30,6 @@ #include #include #include -#include #include #include #ifndef _WIN32 diff --git a/lib/lldp/lldpd.h b/lib/lldp/lldpd.h index f77c6d523..5267c112a 100644 --- a/lib/lldp/lldpd.h +++ b/lib/lldp/lldpd.h @@ -19,13 +19,11 @@ #ifndef _LLDPD_H #define _LLDPD_H -#ifndef _WIN32 +#include #include -#endif #include #include #include -#include #include "dp-packet.h" #include "openvswitch/list.h" #include "lldpd-structs.h" -- cgit v1.2.1