summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2008-06-24 18:14:08 +0200
committerPatrick McHardy <kaber@trash.net>2008-06-24 18:14:08 +0200
commit0b9b67866af8734a8d39dc7c229da7e4ba1be89f (patch)
treec7f10a0ce1fcc36db58d4fc7d76fe265a5555a0d
parentbe78dbbc22e4c033ab9231ac01b4758e4b6d41ff (diff)
libnfq: mark functions as extern C
mark functions as extern C This is needed when #included from C++. Reported-by: Simon <turner25@gmail.com> Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
-rw-r--r--include/libnetfilter_queue/libipq.h8
-rw-r--r--include/libnetfilter_queue/libnetfilter_queue.h8
2 files changed, 15 insertions, 1 deletions
diff --git a/include/libnetfilter_queue/libipq.h b/include/libnetfilter_queue/libipq.h
index c33f7e4..0f0df22 100644
--- a/include/libnetfilter_queue/libipq.h
+++ b/include/libnetfilter_queue/libipq.h
@@ -50,6 +50,10 @@ typedef unsigned long ipq_id_t;
#define MSG_TRUNC 0x20
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct ipq_handle
{
struct nfq_handle *nfqnlh;
@@ -84,5 +88,9 @@ int ipq_ctl(const struct ipq_handle *h, int request, ...);
char *ipq_errstr(void);
void ipq_perror(const char *s);
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif /* _LIBIPQ_H */
diff --git a/include/libnetfilter_queue/libnetfilter_queue.h b/include/libnetfilter_queue/libnetfilter_queue.h
index 6695c3d..1a72c51 100644
--- a/include/libnetfilter_queue/libnetfilter_queue.h
+++ b/include/libnetfilter_queue/libnetfilter_queue.h
@@ -18,6 +18,10 @@
#include <libnetfilter_queue/linux_nfnetlink_queue.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct nfq_handle;
struct nfq_q_handle;
struct nfq_data;
@@ -94,6 +98,8 @@ extern struct nfqnl_msg_packet_hw *nfq_get_packet_hw(struct nfq_data *nfad);
/* return -1 if problem, length otherwise */
extern int nfq_get_payload(struct nfq_data *nfad, char **data);
-
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
#endif /* __LIBNFQNETLINK_H */