~ubuntu-branches/ubuntu/saucy/clamav/saucy-backports

« back to all changes in this revision

Viewing changes to debian/patches/0008-Fix-compiling-on-Hurd.patch

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman
  • Date: 2014-07-15 01:08:10 UTC
  • mfrom: (0.35.47 sid)
  • Revision ID: package-import@ubuntu.com-20140715010810-ru66ek4fun2iseba
Tags: 0.98.4+dfsg-2~ubuntu13.10.1
No-change backport to saucy (LP: #1341962)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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.
 
5
 
 
6
The header linux/sockios.h is not available on Hurd.
 
7
---
 
8
 libclamav/hostid.c | 8 ++++----
 
9
 1 file changed, 4 insertions(+), 4 deletions(-)
 
10
 
 
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
 
15
@@ -47,7 +47,7 @@
 
16
 #include <ifaddrs.h>
 
17
 #endif
 
18
 
 
19
-#if defined(SIOCGIFHWADDR)
 
20
+#if defined(SIOCGIFHWADDR) && !defined(__GNU__)
 
21
 #if defined(_AIX)
 
22
 #include <sys/ndd_var.h>
 
23
 #include <sys/kinfo.h>
 
24
@@ -117,7 +117,7 @@ struct device *get_devices(void)
 
25
     uint8_t *mac;
 
26
     int sock;
 
27
 
 
28
-#if defined(SIOCGIFHWADDR)
 
29
+#if defined(SIOCGIFHWADDR) && !defined(__GNU__)
 
30
     struct ifreq ifr;
 
31
 #else
 
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.
 
36
          */
 
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)
 
43
     }
 
44
 
 
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))
 
50
             continue;