[Pkg-haskell-maintainers] Bug#753405: haskell-network-info: FTBFS on hurd-i386 (again)

Gabriele Giacone 1o5g4r8o at gmail.com
Tue Jul 1 15:05:18 UTC 2014


Source: haskell-network-info
Severity: important
Tags: patch
User: debian-hurd at lists.debian.org
Usertags: hurd
Forwarded: https://github.com/jystic/network-info/pull/12

Dear maintainer,

attached patch fixes FTBFS on hurd.

Thanks for considering.
-------------- next part --------------
--- haskell-network-info-0.2.0.5.orig/cbits/network-unix.c
+++ haskell-network-info-0.2.0.5/cbits/network-unix.c
@@ -18,10 +18,12 @@
 #         define AF_PACKET AF_LINK
 #      endif
 #   endif
-#   ifdef __sun
+#   if defined(__sun) || defined(__GNU__)
 #      include <net/if_arp.h>
-#      include <unistd.h>
 #      include <stropts.h>
+#   endif
+#   ifdef __sun
+#      include <unistd.h>
 #      include <sys/sockio.h>
 #   endif
 #endif
@@ -33,7 +35,7 @@
 #include "network.h"
 #include "common.h"
 
-#if defined(__sun) || !defined(AF_PACKET)
+#if defined(__sun) || (!defined(AF_PACKET) && defined(SIOCGARP))
 int maccopy_arp(unsigned char *dst, struct sockaddr *addr)
 {
     // SOURCE DERIVED FROM: http://www.pauliesworld.org/project/getmac.c
@@ -130,14 +132,14 @@ int c_get_network_interfaces(struct netw
         family = addr->sa_family;
         if (family == AF_INET) {
             ipv4copy(&n->ip_address, addr);
-#if defined(__sun) || !defined(AF_PACKET)
+#if defined(__sun) || (!defined(AF_PACKET) && defined(SIOCGARP))
             if ((ifa->ifa_flags & IFF_LOOPBACK) == 0) {
                 maccopy_arp(n->mac_address, addr);
             }
 #endif
         } else if (family == AF_INET6) {
             ipv6copy(&n->ip6_address, addr);
-#if defined(__sun) || !defined(AF_PACKET)
+#if defined(__sun) || (!defined(AF_PACKET) && defined(SIOCGARP))
             if ((ifa->ifa_flags & IFF_LOOPBACK) == 0) {
                 maccopy_arp(n->mac_address, addr);
             }


More information about the Pkg-haskell-maintainers mailing list