Add include for nflog and nfacct
cover Add include for nflog and nfacct
Hi,
The libnetfilter_log and libnetfilter_acct include can't be put directly on top of a source file because some integer types are not defined. Following this mail are two patches to fix this problem.
BR,
--
Eric
PATCH 1/1 Add include needed for integer type definition.
--- include/libnetfilter_log/libnetfilter_log.h | 1 + 1 file changed, 1 insertion(+)
include/libnetfilter_log/libnetfilter_log.h +1 -0
@@ -9,6 +9,7 @@#ifndef __LIBNETFILTER_LOG_H#define __LIBNETFILTER_LOG_H +#include <sys/types.h> #include <libnetfilter_log/linux_nfnetlink_log.h> struct nflog_handle ;
Signature · 1 line
1.7.10.4
PATCH 1/1 Add include needed for integer types definition.
--- include/libnetfilter_acct/libnetfilter_acct.h | 1 + 1 file changed, 1 insertion(+)
include/libnetfilter_acct/libnetfilter_acct.h +1 -0
@@ -2,6 +2,7 @@#define _LIBNETFILTER_ACCT_H_#include <sys/types.h> +#include <inttypes.h> #include <linux/netfilter/nfnetlink_acct.h> struct nfacct ;
Signature · 1 line
1.7.10.4
Re: [libnfacct PATCH] Add include needed for integer types definition.
Quoted 9 lines · Eric Leblond
---
include/libnetfilter_acct/libnetfilter_acct.h| 1 +1 file changed, 1 insertion(+)include/libnetfilter_acct/libnetfilter_acct.h +0
-0
include/libnetfilter_acct/libnetfilter_acct.h line 6
Quoted 5 lines
include/libnetfilter_acct/libnetfilter_acct.h +1
-0@@ -2,6 +2,7 @@#define _LIBNETFILTER_ACCT_H_#include <sys/types.h> +#include <inttypes.h> #include <linux/netfilter/nfnetlink_acct.h>
The intXX_t pieces are standardized in <stdint.h>
(Or, to cater for C++,
#if defined(__cplusplus) && \
(__cplusplus >= 201100L || defined(__GXX_EXPERIMENTAL_CXX0X__))# include <cstdint>
#else
# include <stdint.h>
#endif