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>
This commit is contained in:
committed by
Benoît Dejean
parent
819bfe56ee
commit
94968b4406
@@ -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>
|
||||
|
Reference in New Issue
Block a user