summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2021-04-23 12:04:58 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2021-04-23 12:06:35 +0200
commit1f8031f79a5f2af850d20dfff193e4d0571cb8d3 (patch)
treefdd3c88e8182b136650977972f9e6a478fcca29e /lib
parentMerge pull request #8536 from idryzhov/bfd-enabled (diff)
downloadfrr-1f8031f79a5f2af850d20dfff193e4d0571cb8d3.tar.xz
frr-1f8031f79a5f2af850d20dfff193e4d0571cb8d3.zip
*: make sure `config.h` or `zebra.h` is first
`config.h` has all the defines from autoconf, which may include things that switch behavior of other included headers (e.g. _GNU_SOURCE enabling prototypes for additional functions.) So, the first include in any `.c` file must be either `config.h` (with the appropriate guard) or `zebra.h` (which includes `config.h` first thing.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libfrr_trace.c2
-rw-r--r--lib/link_state.c2
-rw-r--r--lib/routing_nb.c2
-rw-r--r--lib/routing_nb_config.c2
4 files changed, 8 insertions, 0 deletions
diff --git a/lib/libfrr_trace.c b/lib/libfrr_trace.c
index 2f300e6ee..59320322c 100644
--- a/lib/libfrr_trace.c
+++ b/lib/libfrr_trace.c
@@ -1,4 +1,6 @@
#define TRACEPOINT_CREATE_PROBES
#define TRACEPOINT_DEFINE
+#include <zebra.h>
+
#include "libfrr_trace.h"
diff --git a/lib/link_state.c b/lib/link_state.c
index 8606f8eb0..afeb89c59 100644
--- a/lib/link_state.c
+++ b/lib/link_state.c
@@ -22,6 +22,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <zebra.h>
+
#include "if.h"
#include "linklist.h"
#include "log.h"
diff --git a/lib/routing_nb.c b/lib/routing_nb.c
index 0160354a7..6238fb055 100644
--- a/lib/routing_nb.c
+++ b/lib/routing_nb.c
@@ -16,6 +16,8 @@
* with this program; see the file COPYING; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <zebra.h>
+
#include "northbound.h"
#include "libfrr.h"
#include "routing_nb.h"
diff --git a/lib/routing_nb_config.c b/lib/routing_nb_config.c
index f66f32015..594ad6c9e 100644
--- a/lib/routing_nb_config.c
+++ b/lib/routing_nb_config.c
@@ -17,6 +17,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <zebra.h>
+
#include "northbound.h"
#include "libfrr.h"
#include "vrf.h"