[Pkg-haskell-maintainers] Bug#749047: haskell-network-info: FTBFS on hurd-i386
Samuel Thibault
sthibault at debian.org
Fri May 23 11:38:24 UTC 2014
Source: haskell-network-info
Version: 0.2.0.3-2
Severity: important
Tags: patch
User: debian-hurd at lists.debian.org
Usertags: hurd
Hello,
haskell-network-info FTBFS on hurd-i386 because it assumes that
non-Linux systems have if_dl.h, but hurd-i386 doesn't. The attached
patch fixes it.
Samuel
-- System Information:
Debian Release: jessie/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.14.0 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
--
Samuel
<D> N: j'aime bien Cut d'un truc enorme... ca montre de quel cote de l'ecran sont les couilles :)))
-+- #ens-mim et la peufeupeu -+-
-------------- next part --------------
--- haskell-network-info-0.2.0.3/cbits/network-unix.c.original 2014-05-23 13:33:44.000000000 +0200
+++ haskell-network-info-0.2.0.3/cbits/network-unix.c 2014-05-23 13:36:24.000000000 +0200
@@ -12,8 +12,10 @@
#else
# include <sys/socket.h>
# include <net/if.h>
+# ifndef __GNU__
# include <net/if_dl.h>
-# define AF_PACKET AF_LINK
+# define AF_PACKET AF_LINK
+# endif
#endif
#ifdef __FreeBSD__
@@ -24,6 +26,7 @@
#include "common.h"
+#ifdef AF_PACKET
void maccopy(unsigned char *dst, struct sockaddr *addr)
{
#ifdef __linux__
@@ -35,6 +38,7 @@
memcpy(dst, sdl->sdl_data + sdl->sdl_nlen, MAC_SIZE);
#endif
}
+#endif
struct network_interface *add_interface(struct network_interface *ns, const wchar_t *name, int max_ns)
{
@@ -98,8 +102,10 @@
ipv4copy(&n->ip_address, addr);
} else if (family == AF_INET6) {
ipv6copy(&n->ip6_address, addr);
+#ifdef AF_PACKET
} else if (family == AF_PACKET) {
maccopy(n->mac_address, addr);
+#endif
}
}
More information about the Pkg-haskell-maintainers
mailing list