]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: define SOL_NETLINK if it isn't
authorJohannes Berg <johannes.berg@intel.com>
Thu, 7 Sep 2017 10:55:02 +0000 (12:55 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 7 Sep 2017 11:07:59 +0000 (13:07 +0200)
We need SOL_NETLINK but userspace headers don't always define it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
iw.c
iw.h

diff --git a/iw.c b/iw.c
index 50fa3b8e70e996b19d9036d386c858f251bc5af7..daa2a77008667fd806c9d694d113783cb09387ab 100644 (file)
--- a/iw.c
+++ b/iw.c
@@ -13,6 +13,7 @@
 #include <fcntl.h>
 #include <unistd.h>
 #include <stdbool.h>
+#include <linux/netlink.h>
 
 #include <netlink/genl/genl.h>
 #include <netlink/genl/family.h>
diff --git a/iw.h b/iw.h
index 67e011e9e132952a842c8c2fcb75989ddf504e3e..3c51d84c55478739da2d0daa53f82019a8e1baa6 100644 (file)
--- a/iw.h
+++ b/iw.h
@@ -30,6 +30,9 @@ enum nlmsgerr_attrs {
 #ifndef NLM_F_ACK_TLVS
 #define NLM_F_ACK_TLVS 0x200
 #endif
+#ifndef SOL_NETLINK
+#define SOL_NETLINK 270
+#endif
 
 #define ETH_ALEN 6
 #define VHT_MUMIMO_GROUP_LEN 24