diff options
author | David Lamparter <equinox@diac24.net> | 2021-04-09 20:38:56 +0200 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2021-04-09 20:41:57 +0200 |
commit | 0490ce41c133f9a801f36668dd58b326ec72a7aa (patch) | |
tree | 51c85c94a7b7536e16dcb93bb3ca5ad14d4ffaff /pceplib | |
parent | build: don't link pathd/path_main.c twice (diff) | |
download | frr-0490ce41c133f9a801f36668dd58b326ec72a7aa.tar.xz frr-0490ce41c133f9a801f36668dd58b326ec72a7aa.zip |
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 <lucian.cristian@gmail.com>
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'pceplib')
-rw-r--r-- | pceplib/pcep_msg_tlvs_encoding.c | 9 | ||||
-rw-r--r-- | pceplib/test/pcep_msg_tlvs_test.c | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/pceplib/pcep_msg_tlvs_encoding.c b/pceplib/pcep_msg_tlvs_encoding.c index 967f13814..37f3353f7 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 <sys/endian.h> +#else +#include <endian.h> +#endif /* __FreeBSD__ */ #include <stdlib.h> #include <string.h> diff --git a/pceplib/test/pcep_msg_tlvs_test.c b/pceplib/test/pcep_msg_tlvs_test.c index 6b650f682..57e1d16e9 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 <sys/endian.h> +#else +#include <endian.h> +#endif /* __FreeBSD__ */ #include <stdlib.h> #include <CUnit/CUnit.h> |