]> git.ipfire.org Git - thirdparty/libnftnl.git/commitdiff
include: missing C++ linkage in headers
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 3 Jul 2018 09:55:18 +0000 (11:55 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 3 Jul 2018 09:55:34 +0000 (11:55 +0200)
A few files (batch.h / common.h / set.h / udata.h) are missing the
usual.

Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1268
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/libnftnl/batch.h
include/libnftnl/common.h
include/libnftnl/set.h
include/libnftnl/udata.h

index ea1ea66b684cddfb6b8daca784756a7b816a7d92..ff747f64afd012b4057d662d19c65e00d01bed5f 100644 (file)
@@ -3,6 +3,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct nftnl_batch;
 
 struct nftnl_batch *nftnl_batch_alloc(uint32_t pg_size, uint32_t pg_overrun_size);
@@ -15,4 +19,8 @@ uint32_t nftnl_batch_buffer_len(struct nftnl_batch *batch);
 int nftnl_batch_iovec_len(struct nftnl_batch *batch);
 void nftnl_batch_iovec(struct nftnl_batch *batch, struct iovec *iov, uint32_t iovlen);
 
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
 #endif
index 62c8f6b5e0a3009f247851b68a08a6255ff79894..2df5fbb81a38706777d505a8ff0c6acdde2c07f9 100644 (file)
@@ -3,6 +3,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 enum {
        NFTNL_PARSE_EBADINPUT   = 0,
        NFTNL_PARSE_EMISSINGNODE,
@@ -52,4 +56,8 @@ int nftnl_batch_is_supported(void);
 struct nlmsghdr *nftnl_batch_begin(char *buf, uint32_t seq);
 struct nlmsghdr *nftnl_batch_end(char *buf, uint32_t seq);
 
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
 #endif
index 27f5bc43e7b7f8eaf7515a44e9dc80fa00245ea5..67c54e9ae12c6593db696135ce5ea3020c68351e 100644 (file)
@@ -8,6 +8,10 @@
 
 #include <libnftnl/common.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 enum nftnl_set_attr {
        NFTNL_SET_TABLE,
        NFTNL_SET_NAME,
@@ -144,4 +148,8 @@ void nftnl_set_elems_iter_destroy(struct nftnl_set_elems_iter *iter);
 int nftnl_set_elems_nlmsg_build_payload_iter(struct nlmsghdr *nlh,
                                           struct nftnl_set_elems_iter *iter);
 
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
 #endif /* _LIBNFTNL_SET_H_ */
index e6f80f98b012856ee0baa07cdf65fc140dbae7f0..7dfc0ca9033fad947ed88575ad447148ec9db44e 100644 (file)
@@ -5,6 +5,10 @@
 #include <stdint.h>
 #include <stdbool.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * nftnl user data attributes API
  */
@@ -52,4 +56,8 @@ typedef int (*nftnl_udata_cb_t)(const struct nftnl_udata *attr, void *data);
 int nftnl_udata_parse(const void *data, uint32_t data_len, nftnl_udata_cb_t cb,
                      void *cb_data);
 
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
 #endif /* _LIBNFTNL_UDATA_H_ */