[PATCH 1/3] libipulog: rebuild required header file inclusion

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

 



Use C++ headers for C++ and throw out #includes that are not needed
for the header file.

Signed-off-by: Jan Engelhardt <jengelh@xxxxxxxxxx>
---
 include/libnetfilter_log/libipulog.h |    9 ++++++---
 src/libipulog_compat.c               |    1 +
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/include/libnetfilter_log/libipulog.h b/include/libnetfilter_log/libipulog.h
index 0278862..bb6736a 100644
--- a/include/libnetfilter_log/libipulog.h
+++ b/include/libnetfilter_log/libipulog.h
@@ -1,9 +1,12 @@
 #ifndef _LIBIPULOG_H
 #define _LIBIPULOG_H
 
-#include <errno.h>
-#include <unistd.h>
-#include <fcntl.h>
+#ifdef __cplusplus
+#	include <cstdint>
+#else
+#	include <stdint.h>
+#endif
+#include <sys/types.h>
 
 /* FIXME: glibc sucks */
 #ifndef MSG_TRUNC 
diff --git a/src/libipulog_compat.c b/src/libipulog_compat.c
index 9d93bcd..8c90cdb 100644
--- a/src/libipulog_compat.c
+++ b/src/libipulog_compat.c
@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-- 
1.7.1

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