From 66f00cdd8068cbde56d5ee48528a8330ecfe1706 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Thu, 24 Oct 2019 12:38:48 +0200 Subject: [PATCH] Lib: Include fixes to better split lib from nest --- lib/birdlib.h | 1 + lib/lists.c | 1 - lib/lists.h | 2 ++ lib/resource.c | 2 +- lib/string.h | 6 +++--- nest/bird.h | 1 - 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/birdlib.h b/lib/birdlib.h index 5202b0c8..3e4b81a1 100644 --- a/lib/birdlib.h +++ b/lib/birdlib.h @@ -9,6 +9,7 @@ #ifndef _BIRD_BIRDLIB_H_ #define _BIRD_BIRDLIB_H_ +#include "sysdep/config.h" #include "lib/alloca.h" /* Ugly structure offset handling macros */ diff --git a/lib/lists.c b/lib/lists.c index 4a48d3b7..0b7a5732 100644 --- a/lib/lists.c +++ b/lib/lists.c @@ -26,7 +26,6 @@ #define _BIRD_LISTS_C_ -#include "nest/bird.h" #include "lib/lists.h" /** diff --git a/lib/lists.h b/lib/lists.h index 066eafbb..935c6258 100644 --- a/lib/lists.h +++ b/lib/lists.h @@ -9,6 +9,8 @@ #ifndef _BIRD_LISTS_H_ #define _BIRD_LISTS_H_ +#include "lib/birdlib.h" + /* * I admit the list structure is very tricky and also somewhat awkward, * but it's both efficient and easy to manipulate once one understands the diff --git a/lib/resource.c b/lib/resource.c index ab8c800f..bf29ee79 100644 --- a/lib/resource.c +++ b/lib/resource.c @@ -10,7 +10,7 @@ #include #include -#include "nest/bird.h" +#include "lib/birdlib.h" #include "lib/resource.h" #include "lib/string.h" diff --git a/lib/string.h b/lib/string.h index d6ae5ef7..2bf9cb17 100644 --- a/lib/string.h +++ b/lib/string.h @@ -9,11 +9,11 @@ #ifndef _BIRD_STRING_H_ #define _BIRD_STRING_H_ +#include "lib/birdlib.h" +#include "lib/resource.h" + #include #include -#include - -#include "lib/resource.h" int bsprintf(char *str, const char *fmt, ...); int bvsprintf(char *str, const char *fmt, va_list args); diff --git a/nest/bird.h b/nest/bird.h index 55712abe..931974a0 100644 --- a/nest/bird.h +++ b/nest/bird.h @@ -9,7 +9,6 @@ #ifndef _BIRD_BIRD_H_ #define _BIRD_BIRD_H_ -#include "sysdep/config.h" #include "lib/birdlib.h" #include "lib/ip.h" #include "lib/net.h"