[libgtop] Fix building on musl-libc
- From: Benoît Dejean <bdejean src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgtop] Fix building on musl-libc
- Date: Tue, 16 Feb 2016 17:12:48 +0000 (UTC)
commit 94968b440646a166b08f79391311eea1dd07ac0a
Author: Kylie McClain <somasis exherbo org>
Date: Fri Jan 15 00:08:16 2016 -0500
Fix building on musl-libc
libgtop fails to build on musl libc, due to the header
resulting in the headers that would be loaded for libc 5 being
loaded on musl libc.
musl defines headers which are also defined in linux-headers'
in.h, causing redefinition errors.
https://bugzilla.gnome.org/show_bug.cgi?id=760655
Signed-off-by: Benoît Dejean <bdejean gmail com>
sysdeps/linux/netload.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/sysdeps/linux/netload.c b/sysdeps/linux/netload.c
index b91def0..dcfea34 100644
--- a/sysdeps/linux/netload.c
+++ b/sysdeps/linux/netload.c
@@ -34,7 +34,7 @@
#include <sys/socket.h>
#include <sys/ioctl.h>
-#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
+#if !defined (__GLIBC__) || __GNU_LIBRARY__ > 1
/* GNU LibC */
#include <net/if.h>
#include <netinet/ip_icmp.h>
@@ -43,7 +43,7 @@
#include <netinet/tcp.h>
#include <netinet/udp.h>
#include <net/if.h>
-#else /* Libc 5 */
+#elif defined (__GLIBC__) /* Libc 5 */
#include <linux/if.h>
#include <linux/in.h>
#include <linux/ip.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]