core: Fix compilation in MeeGo
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Wed, 26 Oct 2011 07:15:58 +0000 (10:15 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 26 Oct 2011 09:00:12 +0000 (11:00 +0200)
The _GNU_SOURCE needs to be defined so that O_CLOEXEC
symbols can be found in system header files.
The source does not compile without the patch in MeeGo 1.2

src/inet.c
src/resolver.c
src/rfkill.c
src/timezone.c

index d0a3edc..595f52d 100644 (file)
@@ -25,6 +25,7 @@
 #include <config.h>
 #endif
 
+#define _GNU_SOURCE
 #include <stdio.h>
 #include <errno.h>
 #include <unistd.h>
@@ -1426,12 +1427,6 @@ static const struct in6_addr in6addr_all_nodes_mc = IN6ADDR_ALL_NODES_MC_INIT;
 static const struct in6_addr in6addr_all_routers_mc =
                                                IN6ADDR_ALL_ROUTERS_MC_INIT;
 
-/* from netinet/in.h */
-struct in6_pktinfo {
-       struct in6_addr ipi6_addr;  /* src/dst IPv6 address */
-       unsigned int ipi6_ifindex;  /* send/recv interface index */
-};
-
 static void rs_cleanup(struct rs_cb_data *data)
 {
        g_io_channel_shutdown(data->channel, TRUE, NULL);
index 4cc87dd..68fa4f7 100644 (file)
@@ -23,6 +23,7 @@
 #include <config.h>
 #endif
 
+#define _GNU_SOURCE
 #include <stdio.h>
 #include <errno.h>
 #include <fcntl.h>
index 6ad8279..3fdca2f 100644 (file)
@@ -23,6 +23,7 @@
 #include <config.h>
 #endif
 
+#define _GNU_SOURCE
 #include <stdio.h>
 #include <errno.h>
 #include <fcntl.h>
index 5b17c00..d82502b 100644 (file)
@@ -23,6 +23,7 @@
 #include <config.h>
 #endif
 
+#define _GNU_SOURCE
 #include <errno.h>
 #include <stdio.h>
 #include <fcntl.h>