[gupnp] gupnp-linux-context-manager.c: fix {linux, net}/if.h redefinition
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp] gupnp-linux-context-manager.c: fix {linux, net}/if.h redefinition
- Date: Mon, 5 Aug 2019 09:15:17 +0000 (UTC)
commit 8fdfc7ef6b7e4401e9b5c72c1a215bb8f492ad4d
Author: Fabrice Fontaine <fontaine fabrice gmail com>
Date: Thu Aug 1 22:52:11 2019 +0200
gupnp-linux-context-manager.c: fix {linux,net}/if.h redefinition
Do not include net/if.h if linux/wireless.h is available otherwise build
will fail due to redefinitions like struct ifmap:
In file included from
/home/fabrice/buildroot/output/host/mips64el-buildroot-linux-gnu/sysroot/usr/include/linux/wireless.h:74:0,
from ../libgupnp/gupnp-linux-context-manager.c:52:
/home/fabrice/buildroot/output/host/mips64el-buildroot-linux-gnu/sysroot/usr/include/linux/if.h:169:8:
error: redefinition of 'struct ifmap'
struct ifmap {
^
In file included from ../libgupnp/gupnp-linux-context-manager.c:50:0:
/home/fabrice/buildroot/output/host/mips64el-buildroot-linux-gnu/sysroot/usr/include/net/if.h:111:8:
note: originally defined here
struct ifmap
Signed-off-by: Fabrice Fontaine <fontaine fabrice gmail com>
libgupnp/gupnp-linux-context-manager.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/libgupnp/gupnp-linux-context-manager.c b/libgupnp/gupnp-linux-context-manager.c
index 5b03118..e96ec66 100644
--- a/libgupnp/gupnp-linux-context-manager.c
+++ b/libgupnp/gupnp-linux-context-manager.c
@@ -47,9 +47,10 @@
#include <sys/socket.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
-#include <net/if.h>
#ifdef HAVE_LINUX_WIRELESS_H
#include <linux/wireless.h>
+#else
+#include <net/if.h>
#endif
#include <sys/ioctl.h>
#include <errno.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]