From: Florian Forster Date: Thu, 4 May 2017 07:30:25 +0000 (+0200) Subject: libcollectdclient: Fix BSD support. X-Git-Tag: collectd-5.8.0~102^2~6 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6e006e93c5c34d0022c2a46e111eeb843a793677;p=collectd.git libcollectdclient: Fix BSD support. FreeBSD needs instead of . --- 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