Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macos 12.2.1 编译失败 #173

Open
langlanglanglanglang opened this issue Mar 18, 2022 · 2 comments
Open

macos 12.2.1 编译失败 #173

langlanglanglanglang opened this issue Mar 18, 2022 · 2 comments

Comments

@langlanglanglanglang
Copy link

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
Copy link
Author

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

@semigodking
Copy link
Owner

semigodking commented Mar 18, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants