Skip to content

Commit

Permalink
Merge pull request #4175 from cdu13a/connman-fix1
Browse files Browse the repository at this point in the history
[le92] connman: fix compile with older headers
  • Loading branch information
chewitt committed Feb 5, 2020
2 parents 710041d + 5d2454f commit 5101f80
Showing 1 changed file with 27 additions and 0 deletions.
@@ -0,0 +1,27 @@
diff --git a/src/shared/mnlg.c b/src/shared/mnlg.c
index 6b02059d..b2f71941 100644
--- a/src/shared/mnlg.c
+++ b/src/shared/mnlg.c
@@ -28,6 +28,22 @@
#define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
#endif

+#ifndef NETLINK_CAP_ACK
+#define NETLINK_CAP_ACK 10
+#endif /* NETLINK_CAP_ACK */
+/* support for extack if compilation headers are too old */
+#ifndef NETLINK_EXT_ACK
+#define NETLINK_EXT_ACK 11
+enum nlmsgerr_attrs {
+ NLMSGERR_ATTR_UNUSED,
+ NLMSGERR_ATTR_MSG,
+ NLMSGERR_ATTR_OFFS,
+ NLMSGERR_ATTR_COOKIE,
+
+ __NLMSGERR_ATTR_MAX,
+ NLMSGERR_ATTR_MAX = __NLMSGERR_ATTR_MAX - 1
+};
+#endif

struct mnlg_socket {
struct mnl_socket *nl;

0 comments on commit 5101f80

Please sign in to comment.