48 lines
1.4 KiB
Diff
48 lines
1.4 KiB
Diff
|
Avoid double definition of struct ifmap, struct ifconf,
|
||
|
etc. with musl libc.
|
||
|
|
||
|
--- media/mtransport/third_party/nICEr/src/stun/addrs.c 2015-07-14 00:06:51.000000000 +0200
|
||
|
+++ media/mtransport/third_party/nICEr/src/stun/addrs.c 2015-08-21 13:08:44.161155194 +0200
|
||
|
@@ -44,7 +44,7 @@
|
||
|
#else /* UNIX */
|
||
|
#include <sys/param.h>
|
||
|
#include <sys/socket.h>
|
||
|
-#ifndef ANDROID
|
||
|
+#if !defined(ANDROID) && defined(__GLIBC__)
|
||
|
#include <sys/sysctl.h>
|
||
|
#include <sys/syslog.h>
|
||
|
#else
|
||
|
@@ -62,11 +62,13 @@
|
||
|
#include <net/if_types.h>
|
||
|
#include <sys/sockio.h>
|
||
|
#else
|
||
|
+#if defined(__GLIBC__)
|
||
|
#include <linux/sockios.h>
|
||
|
#include <linux/if.h>
|
||
|
+#endif
|
||
|
#include <linux/kernel.h>
|
||
|
+#if !defined(ANDROID) && defined(__GLIBC__)
|
||
|
#include <linux/wireless.h>
|
||
|
-#ifndef ANDROID
|
||
|
#include <linux/ethtool.h>
|
||
|
#endif
|
||
|
#endif
|
||
|
@@ -616,7 +618,7 @@
|
||
|
|
||
|
#ifdef LINUX
|
||
|
int si = sizeof(struct ifreq);
|
||
|
-#ifndef ANDROID
|
||
|
+#if !defined(ANDROID) && defined(__GLIBC__)
|
||
|
struct ethtool_cmd ecmd;
|
||
|
struct iwreq wrq;
|
||
|
#endif
|
||
|
@@ -642,7 +644,7 @@
|
||
|
else {
|
||
|
addrs[n].interface.type = NR_INTERFACE_TYPE_UNKNOWN;
|
||
|
addrs[n].interface.estimated_speed = 0;
|
||
|
-#if defined(LINUX) && !defined(ANDROID)
|
||
|
+#if defined(LINUX) && defined(__GLIBC__) && !defined(ANDROID)
|
||
|
/* TODO (Bug 896851): interface property for Android */
|
||
|
/* Getting ethtool for ethernet information. */
|
||
|
ecmd.cmd = ETHTOOL_GSET;
|