All of lore.kernel.org
 help / color / mirror / Atom feed
* libnfq: mark functions as extern C
@ 2008-06-23  7:56 Jan Engelhardt
  2008-06-24 16:14 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Engelhardt @ 2008-06-23  7:56 UTC (permalink / raw)
  To: pablo; +Cc: Netfilter Developer Mailing List

commit 7f2678a05bd590f18fa6688785ba11ec6845007b
Author: Jan Engelhardt <jengelh@medozas.de>
Date:   Mon Jun 23 09:54:14 2008 +0200

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>
---
 include/libnetfilter_queue/libipq.h             |    8 ++++++++
 include/libnetfilter_queue/libnetfilter_queue.h |    8 +++++++-
 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 */


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: libnfq: mark functions as extern C
  2008-06-23  7:56 libnfq: mark functions as extern C Jan Engelhardt
@ 2008-06-24 16:14 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2008-06-24 16:14 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: pablo, Netfilter Developer Mailing List

Jan Engelhardt wrote:
> commit 7f2678a05bd590f18fa6688785ba11ec6845007b
> Author: Jan Engelhardt <jengelh@medozas.de>
> Date:   Mon Jun 23 09:54:14 2008 +0200
> 
> mark functions as extern C
>     
> This is needed when #included from C++.

Also applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-24 16:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-23  7:56 libnfq: mark functions as extern C Jan Engelhardt
2008-06-24 16:14 ` Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.