From 6e006e93c5c34d0022c2a46e111eeb843a793677 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 4 May 2017 09:30:25 +0200 Subject: [PATCH] libcollectdclient: Fix BSD support. FreeBSD needs instead of . --- configure.ac | 1 + src/libcollectdclient/network_parse.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/configure.ac b/configure.ac index b6a47dcf..ded4630d 100644 --- a/configure.ac +++ b/configure.ac @@ -175,6 +175,7 @@ AC_CHECK_HEADERS_ONCE([ \ pthread_np.h \ pwd.h \ regex.h \ + sys/endian.h \ sys/fs_types.h \ sys/fstyp.h \ sys/ioctl.h \ diff --git a/src/libcollectdclient/network_parse.c b/src/libcollectdclient/network_parse.c index cbd434b6..02e14b9b 100644 --- a/src/libcollectdclient/network_parse.c +++ b/src/libcollectdclient/network_parse.c @@ -38,6 +38,13 @@ #include #include +/* for be{16,64}toh */ +#if HAVE_ENDIAN_H +#include +#elif HAVE_SYS_ENDIAN_H +#include +#endif + #define GCRYPT_NO_DEPRECATED #include -- 2.30.2