*: 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 <features.h>.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/isisd/topology/random.c b/isisd/topology/random.c
index c49c082..2c457c5 100644
--- a/isisd/topology/random.c
+++ b/isisd/topology/random.c
@@ -7,6 +7,7 @@
 /*                                                                   */
 /*********************************************************************/
 
+#include <zebra.h>
 #include <sys/types.h>
 #include <sys/times.h>
 
diff --git a/isisd/topology/spacyc.c b/isisd/topology/spacyc.c
index 8531447..91a4799 100644
--- a/isisd/topology/spacyc.c
+++ b/isisd/topology/spacyc.c
@@ -1,3 +1,4 @@
+#include <zebra.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/isisd/topology/spgrid.c b/isisd/topology/spgrid.c
index 40147fb..22cfa7b 100644
--- a/isisd/topology/spgrid.c
+++ b/isisd/topology/spgrid.c
@@ -1,11 +1,11 @@
+#include <zebra.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
 #include "random.c"
 
-#include <zebra.h>
-
 #include "thread.h"
 #include "vty.h"
 #include "log.h"
diff --git a/isisd/topology/sprand.c b/isisd/topology/sprand.c
index 28b58b3..1c1eb19 100644
--- a/isisd/topology/sprand.c
+++ b/isisd/topology/sprand.c
@@ -1,3 +1,5 @@
+#include <zebra.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/lib/getopt.c b/lib/getopt.c
index 064909d..7a58a8a 100644
--- a/lib/getopt.c
+++ b/lib/getopt.c
@@ -30,10 +30,6 @@
 # define _NO_PROTO
 #endif
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
 #include <zebra.h>
 
 #if !defined __STDC__ || !__STDC__
diff --git a/lib/getopt1.c b/lib/getopt1.c
index fa76674..bd3099e 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 <config.h>
-#endif
-
 #include <zebra.h>
 #include "getopt.h"
 
diff --git a/lib/stream.c b/lib/stream.c
index 9c26fea..ca1a40f 100644
--- a/lib/stream.c
+++ b/lib/stream.c
@@ -20,8 +20,8 @@
  * 02111-1307, USA.  
  */
 
-#include <stddef.h>
 #include <zebra.h>
+#include <stddef.h>
 
 #include "stream.h"
 #include "memory.h"
diff --git a/lib/workqueue.c b/lib/workqueue.c
index 9fc8931..b1a5d5b 100644
--- a/lib/workqueue.c
+++ b/lib/workqueue.c
@@ -21,7 +21,7 @@
  * 02111-1307, USA.  
  */
 
-#include <lib/zebra.h>
+#include <zebra.h>
 #include "thread.h"
 #include "memory.h"
 #include "workqueue.h"
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index 880edb9..69c04ec 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -20,10 +20,10 @@
   $QuaggaId: $Format:%an, %ai, %h$ $
 */
 
-#include <sys/ioctl.h>
-
 #include <zebra.h>
 
+#include <sys/ioctl.h>
+
 #include "command.h"
 #include "if.h"
 #include "prefix.h"
diff --git a/pimd/pim_igmp_join.c b/pimd/pim_igmp_join.c
index 693a42b..b48adb7 100644
--- a/pimd/pim_igmp_join.c
+++ b/pimd/pim_igmp_join.c
@@ -20,6 +20,8 @@
   $QuaggaId: $Format:%an, %ai, %h$ $
 */
 
+#include <zebra.h>
+
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <string.h>
diff --git a/pimd/pim_int.c b/pimd/pim_int.c
index 0bdd772..2080751 100644
--- a/pimd/pim_int.c
+++ b/pimd/pim_int.c
@@ -20,6 +20,8 @@
   $QuaggaId: $Format:%an, %ai, %h$ $
 */
 
+#include <zebra.h>
+
 #include <string.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
diff --git a/pimd/pim_signals.c b/pimd/pim_signals.c
index d1350b0..dcf4922 100644
--- a/pimd/pim_signals.c
+++ b/pimd/pim_signals.c
@@ -20,9 +20,10 @@
   $QuaggaId: $Format:%an, %ai, %h$ $
 */
 
+#include <zebra.h>
+
 #include <signal.h>
 
-#include <zebra.h>
 #include "sigevent.h"
 #include "memory.h"
 #include "log.h"
diff --git a/pimd/pim_sock.c b/pimd/pim_sock.c
index 4816c56..09b6650 100644
--- a/pimd/pim_sock.c
+++ b/pimd/pim_sock.c
@@ -20,6 +20,7 @@
   $QuaggaId: $Format:%an, %ai, %h$ $
 */
 
+#include <zebra.h>
 #include "pim_mroute.h"
 
 #include <sys/types.h>
@@ -31,7 +32,6 @@
 #include <netdb.h>
 #include <errno.h>
 
-#include <zebra.h>
 #include "log.h"
 #include "privs.h"
 
diff --git a/pimd/pim_static.c b/pimd/pim_static.c
index f2b8e85..3ab5011 100644
--- a/pimd/pim_static.c
+++ b/pimd/pim_static.c
@@ -20,6 +20,8 @@
   $QuaggaId: $Format:%an, %ai, %h$ $
 */
 
+#include <zebra.h>
+
 #include "pim_static.h"
 #include "pim_time.h"
 #include "pim_str.h"
diff --git a/pimd/pim_str.c b/pimd/pim_str.c
index af5a184..3a8353c 100644
--- a/pimd/pim_str.c
+++ b/pimd/pim_str.c
@@ -20,12 +20,12 @@
   $QuaggaId: $Format:%an, %ai, %h$ $
 */
 
+#include <zebra.h>
+
 #include <stdio.h>
 #include <errno.h>
 #include <string.h>
 
-#include <zebra.h>
-
 #include "log.h"
 
 #include "pim_str.h"
diff --git a/pimd/pim_time.c b/pimd/pim_time.c
index 097b470..4e5832c 100644
--- a/pimd/pim_time.c
+++ b/pimd/pim_time.c
@@ -20,11 +20,12 @@
   $QuaggaId: $Format:%an, %ai, %h$ $
 */
 
+#include <zebra.h>
+
 #include <string.h>
 #include <sys/time.h>
 #include <time.h>
 
-#include <zebra.h>
 #include "log.h"
 #include "thread.h"
 
diff --git a/pimd/pim_version.c b/pimd/pim_version.c
index fe7e563..f3a5ee3 100644
--- a/pimd/pim_version.c
+++ b/pimd/pim_version.c
@@ -20,6 +20,8 @@
   $QuaggaId: $Format:%an, %ai, %h$ $
 */
 
+#include <zebra.h>
+
 #include "pim_version.h"
 
 const char * const PIMD_VERSION = PIMD_VERSION_STR;
diff --git a/tests/prng.c b/tests/prng.c
index 8d78ea5..bdcfb07 100644
--- a/tests/prng.c
+++ b/tests/prng.c
@@ -23,6 +23,8 @@
  * 02111-1307, USA.
  */
 
+#include <zebra.h>
+
 #include <assert.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/tests/test-cli.c b/tests/test-cli.c
index 3db44ee..6fab6d5 100644
--- a/tests/test-cli.c
+++ b/tests/test-cli.c
@@ -20,6 +20,8 @@
  * 02111-1307, USA.
  */
 
+#include <zebra.h>
+
 #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 47c0b73..e523929 100644
--- a/tests/test-timer-correctness.c
+++ b/tests/test-timer-correctness.c
@@ -23,11 +23,11 @@
  * 02111-1307, USA.
  */
 
+#include <zebra.h>
+
 #include <stdio.h>
 #include <unistd.h>
 
-#include <zebra.h>
-
 #include "memory.h"
 #include "pqueue.h"
 #include "prng.h"
diff --git a/tests/test-timer-performance.c b/tests/test-timer-performance.c
index a529a5c..ee45ede 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 <stdio.h>
-#include <unistd.h>
 
 #include <zebra.h>
 
+#include <stdio.h>
+#include <unistd.h>
+
 #include "thread.h"
 #include "pqueue.h"
 #include "prng.h"