From 7a2fbbf0ee98f16021c4b809f342ee6cf4b7f8ac Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Tue, 15 Sep 2015 01:53:09 -0700 Subject: [PATCH] *: make sure zebra.h is always included first zebra.h pulls in config.h, which results in fiddling with things like __FILE_OFFSET_BITS. It must always be included first, in order to set flags that influence the compiler via . Signed-off-by: David Lamparter (cherry picked from commit 821df2cf18e5978cc7ab532a8695444380d08270) --- isisd/topology/random.c | 1 + isisd/topology/spacyc.c | 1 + isisd/topology/spgrid.c | 4 ++-- isisd/topology/sprand.c | 2 ++ lib/getopt.c | 4 ---- lib/getopt1.c | 4 ---- lib/stream.c | 2 +- lib/workqueue.c | 2 +- pimd/pim_cmd.c | 4 ++-- pimd/pim_igmp_join.c | 2 ++ pimd/pim_int.c | 2 ++ pimd/pim_signals.c | 3 ++- pimd/pim_sock.c | 2 +- pimd/pim_str.c | 4 ++-- pimd/pim_time.c | 3 ++- pimd/pim_version.c | 2 ++ tests/prng.c | 2 ++ tests/test-cli.c | 2 ++ tests/test-timer-correctness.c | 4 ++-- tests/test-timer-performance.c | 5 +++-- 20 files changed, 32 insertions(+), 23 deletions(-) diff --git a/isisd/topology/random.c b/isisd/topology/random.c index 157cbdb274..be85f7ca18 100644 --- a/isisd/topology/random.c +++ b/isisd/topology/random.c @@ -7,6 +7,7 @@ /* */ /*********************************************************************/ +#include #include #include diff --git a/isisd/topology/spacyc.c b/isisd/topology/spacyc.c index 8531447374..91a4799ced 100644 --- a/isisd/topology/spacyc.c +++ b/isisd/topology/spacyc.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/isisd/topology/spgrid.c b/isisd/topology/spgrid.c index 40147fb5b6..22cfa7ba4d 100644 --- a/isisd/topology/spgrid.c +++ b/isisd/topology/spgrid.c @@ -1,11 +1,11 @@ +#include + #include #include #include #include "random.c" -#include - #include "thread.h" #include "vty.h" #include "log.h" diff --git a/isisd/topology/sprand.c b/isisd/topology/sprand.c index 28b58b30e7..1c1eb19121 100644 --- a/isisd/topology/sprand.c +++ b/isisd/topology/sprand.c @@ -1,3 +1,5 @@ +#include + #include #include #include diff --git a/lib/getopt.c b/lib/getopt.c index 064909d317..7a58a8a8cc 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -30,10 +30,6 @@ # define _NO_PROTO #endif -#ifdef HAVE_CONFIG_H -# include -#endif - #include #if !defined __STDC__ || !__STDC__ diff --git a/lib/getopt1.c b/lib/getopt1.c index fa766747a9..bd3099e799 100644 --- a/lib/getopt1.c +++ b/lib/getopt1.c @@ -20,10 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifdef HAVE_CONFIG_H -#include -#endif - #include #include "getopt.h" diff --git a/lib/stream.c b/lib/stream.c index 716f361dc8..4c237563a5 100644 --- a/lib/stream.c +++ b/lib/stream.c @@ -20,8 +20,8 @@ * 02111-1307, USA. */ -#include #include +#include #include "stream.h" #include "memory.h" diff --git a/lib/workqueue.c b/lib/workqueue.c index 3100b99383..d351beb124 100644 --- a/lib/workqueue.c +++ b/lib/workqueue.c @@ -21,7 +21,7 @@ * 02111-1307, USA. */ -#include +#include #include "thread.h" #include "memory.h" #include "workqueue.h" diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index d60967c377..2132b2742b 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -20,10 +20,10 @@ $QuaggaId: $Format:%an, %ai, %h$ $ */ -#include - #include +#include + #include "command.h" #include "if.h" #include "prefix.h" diff --git a/pimd/pim_igmp_join.c b/pimd/pim_igmp_join.c index 151b2afdbe..62e32c6014 100644 --- a/pimd/pim_igmp_join.c +++ b/pimd/pim_igmp_join.c @@ -20,6 +20,8 @@ $QuaggaId: $Format:%an, %ai, %h$ $ */ +#include + #include #include #include diff --git a/pimd/pim_int.c b/pimd/pim_int.c index 0bdd772ff3..208075190f 100644 --- a/pimd/pim_int.c +++ b/pimd/pim_int.c @@ -20,6 +20,8 @@ $QuaggaId: $Format:%an, %ai, %h$ $ */ +#include + #include #include #include diff --git a/pimd/pim_signals.c b/pimd/pim_signals.c index afd0259658..35493311f9 100644 --- a/pimd/pim_signals.c +++ b/pimd/pim_signals.c @@ -20,9 +20,10 @@ $QuaggaId: $Format:%an, %ai, %h$ $ */ +#include + #include -#include #include "sigevent.h" #include "memory.h" #include "log.h" diff --git a/pimd/pim_sock.c b/pimd/pim_sock.c index 4e6bf7e0a6..2bb48f75a5 100644 --- a/pimd/pim_sock.c +++ b/pimd/pim_sock.c @@ -20,6 +20,7 @@ $QuaggaId: $Format:%an, %ai, %h$ $ */ +#include #include "pim_mroute.h" #include @@ -31,7 +32,6 @@ #include #include -#include #include "log.h" #include "privs.h" diff --git a/pimd/pim_str.c b/pimd/pim_str.c index af5a184d2f..3a8353cd8c 100644 --- a/pimd/pim_str.c +++ b/pimd/pim_str.c @@ -20,12 +20,12 @@ $QuaggaId: $Format:%an, %ai, %h$ $ */ +#include + #include #include #include -#include - #include "log.h" #include "pim_str.h" diff --git a/pimd/pim_time.c b/pimd/pim_time.c index 097b470baf..4e5832cc65 100644 --- a/pimd/pim_time.c +++ b/pimd/pim_time.c @@ -20,11 +20,12 @@ $QuaggaId: $Format:%an, %ai, %h$ $ */ +#include + #include #include #include -#include #include "log.h" #include "thread.h" diff --git a/pimd/pim_version.c b/pimd/pim_version.c index fe7e56343c..f3a5ee3359 100644 --- a/pimd/pim_version.c +++ b/pimd/pim_version.c @@ -20,6 +20,8 @@ $QuaggaId: $Format:%an, %ai, %h$ $ */ +#include + #include "pim_version.h" const char * const PIMD_VERSION = PIMD_VERSION_STR; diff --git a/tests/prng.c b/tests/prng.c index 8d78ea523b..bdcfb07af1 100644 --- a/tests/prng.c +++ b/tests/prng.c @@ -23,6 +23,8 @@ * 02111-1307, USA. */ +#include + #include #include #include diff --git a/tests/test-cli.c b/tests/test-cli.c index 3db44eec82..6fab6d52cb 100644 --- a/tests/test-cli.c +++ b/tests/test-cli.c @@ -20,6 +20,8 @@ * 02111-1307, USA. */ +#include + #include "common-cli.h" DUMMY_DEFUN(cmd0, "arg ipv4 A.B.C.D"); diff --git a/tests/test-timer-correctness.c b/tests/test-timer-correctness.c index 47c0b7376e..e523929be1 100644 --- a/tests/test-timer-correctness.c +++ b/tests/test-timer-correctness.c @@ -23,11 +23,11 @@ * 02111-1307, USA. */ +#include + #include #include -#include - #include "memory.h" #include "pqueue.h" #include "prng.h" diff --git a/tests/test-timer-performance.c b/tests/test-timer-performance.c index a529a5ce0a..ee45ede6ac 100644 --- a/tests/test-timer-performance.c +++ b/tests/test-timer-performance.c @@ -22,11 +22,12 @@ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. */ -#include -#include #include +#include +#include + #include "thread.h" #include "pqueue.h" #include "prng.h" -- 2.39.5