From 8d4e934b08b10823f33ff74c477fec454913e952 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Fri, 22 Oct 2021 16:59:42 +0200 Subject: [PATCH] lib: avoid include loop with assert.h `assert.h` -> `xref.h` -> `typesafe.h` -> `assert.h` Might be possible to do this more cleanly some way, but that way is not obvious, so here's the "simple & dumb" approach. Signed-off-by: David Lamparter --- lib/atomlist.c | 2 ++ lib/frrcu.h | 2 ++ lib/typesafe.c | 1 + lib/typesafe.h | 1 - 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/atomlist.c b/lib/atomlist.c index 3668b083d0..b7c9516a00 100644 --- a/lib/atomlist.c +++ b/lib/atomlist.c @@ -18,6 +18,8 @@ #include "config.h" #endif +#include + #include "atomlist.h" void atomlist_add_head(struct atomlist_head *h, struct atomlist_item *item) diff --git a/lib/frrcu.h b/lib/frrcu.h index 3808259040..ae840926b5 100644 --- a/lib/frrcu.h +++ b/lib/frrcu.h @@ -17,6 +17,8 @@ #ifndef _FRRCU_H #define _FRRCU_H +#include + #include "memory.h" #include "atomlist.h" diff --git a/lib/typesafe.c b/lib/typesafe.c index f90b59daf0..3b65a2d02a 100644 --- a/lib/typesafe.c +++ b/lib/typesafe.c @@ -20,6 +20,7 @@ #include #include +#include #include "typesafe.h" #include "memory.h" diff --git a/lib/typesafe.h b/lib/typesafe.h index 44c42ffbca..b284397d98 100644 --- a/lib/typesafe.h +++ b/lib/typesafe.h @@ -20,7 +20,6 @@ #include #include #include -#include #include "compiler.h" #ifdef __cplusplus