[Pkg-haskell-commits] darcs: haskell-network-info: Add hurd compat patch by Gabriele Giacone (Closes: 753405

Joachim Breitner mail at joachim-breitner.de
Sun May 24 09:41:48 UTC 2015


Sun May 24 09:37:40 UTC 2015  Joachim Breitner <mail at joachim-breitner.de>
  * Add hurd compat patch by Gabriele Giacone (Closes: 753405 

    M ./changelog +6
    A ./patches/
    A ./patches/hurd-compat
    A ./patches/series

Sun May 24 09:37:40 UTC 2015  Joachim Breitner <mail at joachim-breitner.de>
  * Add hurd compat patch by Gabriele Giacone (Closes: 753405 
diff -rN -u old-haskell-network-info/changelog new-haskell-network-info/changelog
--- old-haskell-network-info/changelog	2015-05-24 09:41:48.430905495 +0000
+++ new-haskell-network-info/changelog	2015-05-24 09:41:48.434905592 +0000
@@ -1,3 +1,9 @@
+haskell-network-info (0.2.0.5-4) UNRELEASED; urgency=medium
+
+  * Add hurd compat patch by Gabriele Giacone (Closes: 753405 
+
+ -- Joachim Breitner <nomeata at debian.org>  Sun, 24 May 2015 11:36:57 +0200
+
 haskell-network-info (0.2.0.5-3) unstable; urgency=medium
 
   * Upload to unstable
diff -rN -u old-haskell-network-info/patches/hurd-compat new-haskell-network-info/patches/hurd-compat
--- old-haskell-network-info/patches/hurd-compat	1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-network-info/patches/hurd-compat	2015-05-24 09:41:48.430905495 +0000
@@ -0,0 +1,45 @@
+Forwarded to https://github.com/jystic/network-info/pull/12
+
+--- 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);
+             }
diff -rN -u old-haskell-network-info/patches/series new-haskell-network-info/patches/series
--- old-haskell-network-info/patches/series	1970-01-01 00:00:00.000000000 +0000
+++ new-haskell-network-info/patches/series	2015-05-24 09:41:48.430905495 +0000
@@ -0,0 +1 @@
+hurd-compat




More information about the Pkg-haskell-commits mailing list