[PATCH 2/2] build: resolve compile abort on RHEL5 #2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 src/internal.h |   12 ++++++++++++
 1 file changed, 12 insertions(+)

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
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux