Merge pull request #4175 from cdu13a/connman-fix1

[le92] connman: fix compile with older headers
This commit is contained in:
Christian Hewitt 2020-02-05 18:56:37 +04:00 committed by GitHub
commit 5101f8090d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;