semigodking / redsocks

transparent redirector of any TCP/UDP connection to proxy
Apache License 2.0
1.17k stars 247 forks source link

macos 12.2.1 编译失败 #173

Open langlanglanglanglang opened 2 years ago

langlanglanglanglang commented 2 years ago

redsocks2 git:(master) ✗ make Compile with OpenSSL by default. To compile with PolarSSL, run 'make USE_CRYPTO_POLARSSL=true' instead. cc -fPIC -O3 -D_BSD_SOURCE -D_DEFAULT_SOURCE -Wall -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib -Ixnu/12.2 -DUSE_CRYPTO_OPENSSL -c -o base.o base.c clang: warning: argument unused during compilation: '-L/usr/local/opt/openssl/lib' [-Wunused-command-line-argument] In file included from base.c:41: xnu/12.2/net/pfvar.h:1:1: error: expected identifier or '(' 404: Not Found ^ In file included from base.c:59: In file included from ./redsocks.h:7: ./list.h:34:9: warning: 'LIST_HEAD' macro redefined [-Wmacro-redefined]

define LIST_HEAD(name) \

    ^

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/queue.h:465:9: note: previous definition is here

define LIST_HEAD(name, type) \

    ^

base.c:189:23: error: variable has incomplete type 'struct pfioc_natlook' struct pfioc_natlook nl; ^ base.c:189:9: note: forward declaration of 'struct pfioc_natlook' struct pfioc_natlook nl; ^ base.c:193:17: error: invalid application of 'sizeof' to an incomplete type 'struct pfioc_natlook' memset(&nl, 0, sizeof(struct pfioc_natlook)); ^ ~~~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:77:33: note: expanded from macro 'memset' builtin___memset_chk (dest, VA_ARGS, darwin_obsz0 (dest)) ^~~ base.c:189:9: note: forward declaration of 'struct pfioc_natlook' struct pfioc_natlook nl; ^ base.c:200:17: error: use of undeclared identifier 'PF_OUT' nl.direction = PF_OUT; ^ base.c:202:18: error: use of undeclared identifier 'DIOCNATLOOK' if (ioctl(pffd, DIOCNATLOOK, &nl) != 0) { ^ base.c:204:19: error: use of undeclared identifier 'PF_IN' nl.direction = PF_IN; // required to redirect local packets ^ base.c:205:20: error: use of undeclared identifier 'DIOCNATLOOK' if (ioctl(pffd, DIOCNATLOOK, &nl) != 0) { ^ 1 warning and 7 errors generated. make: *** [base.o] Error 1

langlanglanglanglang commented 2 years ago

已经执行过 git apply patches/disable-ss.patch了

semigodking commented 2 years ago

i am not able to help as i am not a mac user.

lang @.***> 于 2022年3月18日周五 16:05写道:

已经执行过 git apply patches/disable-ss.patch了

— Reply to this email directly, view it on GitHub https://github.com/semigodking/redsocks/issues/173#issuecomment-1072121143, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAP2XD5YMKGHTNIMKNNUNITVAQ2LTANCNFSM5RBDIIYA . You are receiving this because you are subscribed to this thread.Message ID: @.***>