Merge pull request #32 from fix-macosx/macosx-yosemite

Support Mac OS X 10.10 by using 10.9 headers
This commit is contained in:
Daniel Roethlisberger 2014-10-21 15:42:37 +02:00
commit 79c67ebed7
3 changed files with 14 additions and 6 deletions

View File

@ -60,10 +60,10 @@ else ifeq ($(basename $(basename $(shell uname -r))),13)
# Mac OS X Mavericks # Mac OS X Mavericks
FEATURES+= -DHAVE_PF FEATURES+= -DHAVE_PF
PKG_CPPFLAGS+= -I./xnu/10.9 PKG_CPPFLAGS+= -I./xnu/10.9
#else ifeq ($(basename $(basename $(shell uname -r))),14) else ifeq ($(basename $(basename $(shell uname -r))),14)
# Mac OS X Syrah # Mac OS X Yosemite
#FEATURES+= -DHAVE_PF FEATURES+= -DHAVE_PF
#PKG_CPPFLAGS+= -I./xnu/10.10 PKG_CPPFLAGS+= -I./xnu/10.9
endif endif
endif endif

6
main.c
View File

@ -222,7 +222,11 @@ main(int argc, char *argv[])
argv0 = argv[0]; argv0 = argv[0];
opts = opts_new(); opts = opts_new();
natengine = strdup(nat_getdefaultname()); if (nat_getdefaultname()) {
natengine = strdup(nat_getdefaultname());
} else {
natengine = NULL;
}
while ((ch = getopt(argc, argv, OPT_g OPT_G OPT_Z while ((ch = getopt(argc, argv, OPT_g OPT_G OPT_Z
"k:c:C:K:t:OPs:e:Eu:j:p:l:L:S:dDVh")) != -1) { "k:c:C:K:t:OPs:e:Eu:j:p:l:L:S:dDVh")) != -1) {

6
opts.c
View File

@ -186,7 +186,11 @@ proxyspec_parse(int *argc, char **argv[], const char *natengine)
if (af == -1) { if (af == -1) {
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
spec->natengine = strdup(natengine); if (natengine) {
spec->natengine = strdup(natengine);
} else {
spec->natengine = NULL;
}
state++; state++;
break; break;
case 3: case 3: