summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@inai.de>2012-10-13 14:05:47 +0200
committerJan Engelhardt <jengelh@inai.de>2012-10-13 14:05:47 +0200
commite01126788f5d1eb4b2b1bc3de72a419a18a5ba7e (patch)
treee6b502f212e163b7c564707ec82c353fcd60a3f9 /src
parentd4a740659e127f6950ac8c43ef4f6a641594ed89 (diff)
build: resolve compile abort on RHEL5 #2
libnetfilter_acct.c: In function 'nfacct_nlmsg_build_payload': libnetfilter_acct.c:422: warning: implicit declaration of function 'htobe64' libnetfilter_acct.c: In function 'nfacct_nlmsg_parse_payload': libnetfilter_acct.c:477: warning: implicit declaration of function 'be64toh' Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Diffstat (limited to 'src')
-rw-r--r--src/internal.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/internal.h b/src/internal.h
index 3a88d1a..2106401 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -9,4 +9,16 @@
# define EXPORT_SYMBOL
#endif
+#include <endian.h>
+#if !defined(htobe64)
+# include <byteswap.h>
+# if __BYTE_ORDER == __LITTLE_ENDIAN
+# define htobe64(x) __bswap_64(x)
+# define betoh64(x) __bswap_64(x)
+# else
+# define htobe64(x) (x)
+# define betoh64(x) (x)
+# endif
+#endif
+
#endif