diff options
author | Thomas Haller <thaller@redhat.com> | 2023-08-07 09:29:21 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2023-08-07 09:38:49 (GMT) |
commit | 1af767a88e4dce07fcb552f00123b2c856d20461 (patch) | |
tree | a04ba879ee50d041c431f5fb96707a5c2bc2621b /include | |
parent | e0a5d12bffde1c7012537eb4fe2a6336a563f9c5 (diff) | |
download | libnl-1af767a88e4dce07fcb552f00123b2c856d20461.zip libnl-1af767a88e4dce07fcb552f00123b2c856d20461.tar.gz libnl-1af767a88e4dce07fcb552f00123b2c856d20461.tar.bz2 |
include: add missing "extern "C"" specifier to public headers
Diffstat (limited to 'include')
-rw-r--r-- | include/netlink/hash.h | 9 | ||||
-rw-r--r-- | include/netlink/list.h | 8 | ||||
-rw-r--r-- | include/netlink/netlink-compat.h | 8 | ||||
-rw-r--r-- | include/netlink/route/qdisc/red.h | 8 | ||||
-rw-r--r-- | include/netlink/types.h | 8 | ||||
-rw-r--r-- | include/netlink/version.h.in | 8 |
6 files changed, 49 insertions, 0 deletions
diff --git a/include/netlink/hash.h b/include/netlink/hash.h index 0bda74e..5df4099 100644 --- a/include/netlink/hash.h +++ b/include/netlink/hash.h @@ -5,6 +5,7 @@ */ #ifndef CCAN_HASH_H #define CCAN_HASH_H + #include <stdint.h> #include <stdlib.h> #include <endian.h> @@ -14,6 +15,10 @@ * http://burtleburtle.net/bob/c/lookup3.c */ +#ifdef __cplusplus +extern "C" { +#endif + #ifdef __LITTLE_ENDIAN # define HAVE_LITTLE_ENDIAN 1 #elif __BIG_ENDIAN @@ -66,4 +71,8 @@ /* Our underlying operations. */ uint32_t nl_hash_any(const void *key, size_t length, uint32_t base); +#ifdef __cplusplus +} +#endif + #endif /* HASH_H */ diff --git a/include/netlink/list.h b/include/netlink/list.h index 7ab1438..7f300df 100644 --- a/include/netlink/list.h +++ b/include/netlink/list.h @@ -8,6 +8,10 @@ #include <stddef.h> +#ifdef __cplusplus +extern "C" { +#endif + struct nl_list_head { struct nl_list_head * next; @@ -86,4 +90,8 @@ static inline int nl_list_empty(struct nl_list_head *head) #define nl_init_list_head(head) \ do { (head)->next = (head); (head)->prev = (head); } while (0) +#ifdef __cplusplus +} +#endif + #endif diff --git a/include/netlink/netlink-compat.h b/include/netlink/netlink-compat.h index ed71ed4..76b4595 100644 --- a/include/netlink/netlink-compat.h +++ b/include/netlink/netlink-compat.h @@ -6,6 +6,10 @@ #ifndef NETLINK_COMPAT_H_ #define NETLINK_COMPAT_H_ +#ifdef __cplusplus +extern "C" { +#endif + #if !defined _LINUX_SOCKET_H && !defined _BITS_SOCKADDR_H typedef unsigned short sa_family_t; #endif @@ -45,4 +49,8 @@ typedef unsigned short sa_family_t; #define AF_MPLS 28 #endif +#ifdef __cplusplus +} +#endif + #endif diff --git a/include/netlink/route/qdisc/red.h b/include/netlink/route/qdisc/red.h index c6c841b..f74ad80 100644 --- a/include/netlink/route/qdisc/red.h +++ b/include/netlink/route/qdisc/red.h @@ -9,7 +9,15 @@ #include <netlink/netlink.h> #include <netlink/route/qdisc.h> +#ifdef __cplusplus +extern "C" { +#endif + extern void rtnl_red_set_limit(struct rtnl_qdisc *qdisc, int limit); extern int rtnl_red_get_limit(struct rtnl_qdisc *qdisc); +#ifdef __cplusplus +} +#endif + #endif diff --git a/include/netlink/types.h b/include/netlink/types.h index 1e3a9a9..a3a28fd 100644 --- a/include/netlink/types.h +++ b/include/netlink/types.h @@ -8,6 +8,10 @@ #include <stdio.h> +#ifdef __cplusplus +extern "C" { +#endif + /** * @ingroup utils * Enumeration of dumping variations (dp_type) @@ -101,4 +105,8 @@ struct nl_dump_params unsigned int dp_line; }; +#ifdef __cplusplus +} +#endif + #endif diff --git a/include/netlink/version.h.in b/include/netlink/version.h.in index 7fccc95..3c43355 100644 --- a/include/netlink/version.h.in +++ b/include/netlink/version.h.in @@ -8,6 +8,10 @@ /* Compile Time Versioning Information */ +#ifdef __cplusplus +extern "C" { +#endif + #define LIBNL_STRING "@PACKAGE_STRING@" #define LIBNL_VERSION "@PACKAGE_VERSION@" @@ -28,4 +32,8 @@ extern const int nl_ver_maj; extern const int nl_ver_min; extern const int nl_ver_mic; +#ifdef __cplusplus +} +#endif + #endif |