1
From 79d8c3e3d2f43e363bc424a076fb12be20afb605 Mon Sep 17 00:00:00 2001
2
From: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
3
Date: Sat, 21 Jun 2014 17:00:47 +0200
4
Subject: Fix compiling on Hurd.
6
The header linux/sockios.h is not available on Hurd.
8
libclamav/hostid.c | 8 ++++----
9
1 file changed, 4 insertions(+), 4 deletions(-)
11
diff --git a/libclamav/hostid.c b/libclamav/hostid.c
12
index 7a33344..bcc615e 100644
13
--- a/libclamav/hostid.c
14
+++ b/libclamav/hostid.c
19
-#if defined(SIOCGIFHWADDR)
20
+#if defined(SIOCGIFHWADDR) && !defined(__GNU__)
22
#include <sys/ndd_var.h>
23
#include <sys/kinfo.h>
24
@@ -117,7 +117,7 @@ struct device *get_devices(void)
28
-#if defined(SIOCGIFHWADDR)
29
+#if defined(SIOCGIFHWADDR) && !defined(__GNU__)
32
struct sockaddr_dl *sdl;
33
@@ -156,7 +156,7 @@ struct device *get_devices(void)
34
* Instead, Linux uses its own ioctl. This code only runs if we're not Linux,
35
* Windows, or FreeBSD.
37
-#if !defined(SIOCGIFHWADDR)
38
+#if !defined(SIOCGIFHWADDR) || defined(__GNU__)
39
for (i=0; i < ndevices; i++) {
40
if (!(strcmp(devices[i].name, addr->ifa_name))) {
41
sdl = (struct sockaddr_dl *)(addr->ifa_addr);
42
@@ -181,7 +181,7 @@ struct device *get_devices(void)
45
/* This is the Linux version of getting the MAC addresses */
46
-#if defined(SIOCGIFHWADDR)
47
+#if defined(SIOCGIFHWADDR) && !defined(__GNU__)
48
for (i=0; i < ndevices; i++) {
49
if (!(devices[i].name))