Created
March 27, 2014 02:10
-
-
Save tevino/9798566 to your computer and use it in GitHub Desktop.
This fix an error about the function `tun_close` in n2n_v2(r7394 tested) when compiling on OS X
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
If you see the error message below, you may need this patch: | |
Undefined symbols for architecture x86_64: | |
"_tun_close", referenced from: | |
_tuntap_open in n2n.a(tuntap_osx.o) | |
ld: symbol(s) not found for architecture x86_64 | |
# How to use | |
If you got the source code from official repository, like me: | |
svn co https://svn.ntop.org/svn/ntop/trunk/n2n | |
Go to the folder of n2n_v2 | |
cd n2n/n2n_v2 | |
Apply this patch | |
patch < /path_to/n2n_v2_osx_fix.diff | |
And enjoy your make :D | |
make | |
Index: tuntap_osx.c | |
=================================================================== | |
--- tuntap_osx.c (revision 7394) | |
+++ tuntap_osx.c (working copy) | |
@@ -19,7 +19,7 @@ | |
#ifdef _DARWIN_ | |
-void tun_close(tuntap_dev *device); | |
+//void tun_close(tuntap_dev *device); | |
/* ********************************** */ | |
@@ -77,7 +77,7 @@ | |
fd = popen(buf, "r"); | |
if(fd < 0) { | |
- tun_close(device); | |
+ tuntap_close(device); | |
return(-1); | |
} else { | |
int a, b, c, d, e, f; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment