-
-
Save fire/5a5236653f4ad5099321 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/jystic/network-info.git | |
curl https://gist.githubusercontent.com/fire/5a5236653f4ad5099321/raw/db7518eef55a37ed57811716811c553fec701ac9/network-info.patch > network-info.patch | |
patch network-info/cbits/network-unix.c network-info.patch | |
mkdir test | |
cd test/ | |
cabal sandbox init | |
cabal sandbox add-source ../network-info | |
cabal install git-annex --bindir=$HOME/bin -f"-assistant -webapp -webdav -pairing -xmpp -dns" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From caae700742aa22e6b09035f38776ab42a2c10eab Mon Sep 17 00:00:00 2001 | |
From: Robert Mustacchi <[email protected]> | |
Date: Sat, 7 Jun 2014 06:43:46 +0000 | |
Subject: [PATCH] fix illumos build | |
--- | |
cbits/network-unix.c | 4 +++- | |
1 file changed, 3 insertions(+), 1 deletion(-) | |
diff --git a/cbits/network-unix.c b/cbits/network-unix.c | |
index eb6310c..be0770c 100644 | |
--- a/cbits/network-unix.c | |
+++ b/cbits/network-unix.c | |
@@ -13,8 +13,10 @@ | |
# include <sys/socket.h> | |
# include <net/if.h> | |
# include <net/if_dl.h> | |
+#ifndef __sun__ | |
# define AF_PACKET AF_LINK | |
#endif | |
+#endif | |
#ifdef __FreeBSD__ | |
# include <net/pfvar.h> | |
@@ -26,7 +28,7 @@ | |
void maccopy(unsigned char *dst, struct sockaddr *addr) | |
{ | |
-#ifdef __linux__ | |
+#if defined(__linux__) || defined(__sun__) | |
/* TODO check that sll_halen is equal to 6 (MAC_SIZE) */ | |
memcpy(dst, ((struct sockaddr_ll *)addr)->sll_addr, MAC_SIZE); | |
#else | |
-- | |
1.8.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cabal update | |
cabal install cabal-install | |
PATH=~/.cabal/bin:$PATH` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment