libnl-tiny: include <sys/socket.h>
authorFelix Fietkau <nbd@openwrt.org>
Wed, 11 Nov 2015 11:39:21 +0000 (11:39 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 11 Nov 2015 11:39:21 +0000 (11:39 +0000)
Currently some libnl headers require application code to include
dependencies on its own. E.g. a simple include of <linux/netlink.h>
will trigger an error:
/usr/include/libnl-tiny/linux/netlink.h:32:2: error: unknown type name 'sa_family_t'

Similarly including <netlink/handlers.h> causes:
/usr/include/libnl-tiny/netlink/handlers.h:133:19: warning: 'struct ucred' declared inside parameter list [enabled by default]

Fix it by including <sys/socket.h> where needed in libnl headers.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 47456

package/libs/libnl-tiny/src/include/linux/netlink.h
package/libs/libnl-tiny/src/include/netlink/handlers.h

index d252103d2b7d9f598f92c2beb8e8e030880c3e61..3d6d367b12057a62ad0e08a28d4393dd7e1d2241 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <linux/socket.h> /* for sa_family_t */
 #include <linux/types.h>
+#include <sys/socket.h> /* for sa_family_t */
 
 #define NETLINK_ROUTE          0       /* Routing/device hook                          */
 #define NETLINK_UNUSED         1       /* Unused number                                */
index 7fb53b4eeefe5dba27002c644c9029b75a9749a6..f5c933d0d7131adcb4ca5e89e2abe042f5fd2d3d 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <stdio.h>
 #include <stdint.h>
+#include <sys/socket.h>
 #include <sys/types.h>
 #include <netlink/netlink-compat.h>
 #include <netlink/netlink-kernel.h>