From 0490ce41c133f9a801f36668dd58b326ec72a7aa Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Fri, 9 Apr 2021 20:38:56 +0200 Subject: pceplib: add missing endian.h and config.h endian.h supplies be*toh() and htobe*() functions. This fixes the build on musl libc. On other systems it seems endian.h comes in transitively from some other header. (Also, all .c files should have config.h or zebra.h as the first include, even if it works without that it's b0rked and only works due to luck.) Tested-by: Lucian Cristian Signed-off-by: David Lamparter --- pceplib/pcep_msg_tlvs_encoding.c | 9 +++++++++ pceplib/test/pcep_msg_tlvs_test.c | 9 +++++++++ 2 files changed, 18 insertions(+) (limited to 'pceplib') diff --git a/pceplib/pcep_msg_tlvs_encoding.c b/pceplib/pcep_msg_tlvs_encoding.c index 967f138143..37f3353f76 100644 --- a/pceplib/pcep_msg_tlvs_encoding.c +++ b/pceplib/pcep_msg_tlvs_encoding.c @@ -25,6 +25,15 @@ * Encoding and decoding for PCEP Object TLVs. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifdef __FreeBSD__ +#include +#else +#include +#endif /* __FreeBSD__ */ #include #include diff --git a/pceplib/test/pcep_msg_tlvs_test.c b/pceplib/test/pcep_msg_tlvs_test.c index 6b650f6823..57e1d16e91 100644 --- a/pceplib/test/pcep_msg_tlvs_test.c +++ b/pceplib/test/pcep_msg_tlvs_test.c @@ -21,6 +21,15 @@ */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifdef __FreeBSD__ +#include +#else +#include +#endif /* __FreeBSD__ */ #include #include -- cgit v1.2.3