From db4079249ca4ead5821ce6e1d32edad84c2579aa Mon Sep 17 00:00:00 2001 From: Andreas Cadhalpun Date: Sat, 21 Jun 2014 17:00:47 +0200 Subject: Fix compiling on Hurd. The header linux/sockios.h is not available on Hurd. --- libclamav/hostid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libclamav/hostid.c b/libclamav/hostid.c index bf988de2d6fd..e683539eaf41 100644 --- a/libclamav/hostid.c +++ b/libclamav/hostid.c @@ -47,7 +47,7 @@ #include #endif -#if defined(SIOCGIFHWADDR) +#if defined(SIOCGIFHWADDR) && !defined(__GNU__) #if defined(_AIX) #include #include @@ -116,7 +116,7 @@ struct device *get_devices(void) uint8_t *mac; int sock; -#if defined(SIOCGIFHWADDR) +#if defined(SIOCGIFHWADDR) && !defined(__GNU__) struct ifreq ifr; #else struct sockaddr_dl *sdl; @@ -155,7 +155,7 @@ struct device *get_devices(void) * Instead, Linux uses its own ioctl. This code only runs if we're not Linux, * Windows, or FreeBSD. */ -#if !defined(SIOCGIFHWADDR) +#if !defined(SIOCGIFHWADDR) || defined(__GNU__) for (i=0; i < ndevices; i++) { if (!(strcmp(devices[i].name, addr->ifa_name))) { sdl = (struct sockaddr_dl *)(addr->ifa_addr); @@ -180,7 +180,7 @@ struct device *get_devices(void) } /* This is the Linux version of getting the MAC addresses */ -#if defined(SIOCGIFHWADDR) +#if defined(SIOCGIFHWADDR) && !defined(__GNU__) for (i=0; i < ndevices; i++) { if (!(devices[i].name)) continue;