FlowerWrong/ip2socks

mac 编译报错

johnnyhansen-away opened this issue · 2 comments

你好, mac下编译报错, 请问是什么原因
/Users/ip2socks/ip2socks-by-FlowerWrong/lwip-contrib/ports/unix/port/include/arch/cc.h:76:9: warning: 'LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS' macro
redefined [-Wmacro-redefined]
#define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS
^
/Users/ip2socks/ip2socks-by-FlowerWrong/src/lwipopts.h:487:9: note: previous definition is here
#define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS 0
^
/Users/ip2socks/ip2socks-by-FlowerWrong/src/netif/tunif.c:100:28: error: implicit declaration of function 'writev' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
return utun_modified_len(writev(fd, iv, 2));
^
/Users/ip2socks/ip2socks-by-FlowerWrong/src/netif/tunif.c:100:28: note: did you mean 'write'?
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/unistd.h:496:10: note: 'write' declared here
ssize_t write(int __fd, const void * __buf, size_t __nbyte) __DARWIN_ALIAS_C(write);
^
/Users/ip2socks/ip2socks-by-FlowerWrong/src/netif/tunif.c:112:28: error: implicit declaration of function 'readv' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
return utun_modified_len(readv(fd, iv, 2));
^
/Users/ip2socks/ip2socks-by-FlowerWrong/src/netif/tunif.c:112:28: note: did you mean 'read'?
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/unistd.h:472:10: note: 'read' declared here
ssize_t read(int, void *, size_t) __DARWIN_ALIAS_C(read);
^
1 warning and 2 errors generated.
make[2]: *** [CMakeFiles/ip2socks.dir/src/netif/tunif.c.o] Error 1
make[1]: *** [CMakeFiles/ip2socks.dir/all] Error 2
make: *** [all] Error 2

上一个问题加了个 头文件好了, 在编译报这个错

EV_API_DECL void ev_set_loop_release_cb (EV_P_ void (*release)(EV_P) EV_THROW, void (*acquire)(EV_P) EV_THROW) EV_THROW;
^
/Users/p2socks/ip2socks-by-FlowerWrong/src/udp_raw.cpp:211:53: error: no member named 'remote_fake_port' in 'udp_pcb'; did you mean 'remote_port'?
if (strcmp("tcp", conf->dns_mode) == 0 && upcb->remote_fake_port == 53) {
^~~~~~~~~~~~~~~~
remote_port
/Users/tuntaposx/ip2socks/ip2socks-by-FlowerWrong/lwip/src/include/lwip/udp.h:91:21: note: 'remote_port' declared here
u16_t local_port, remote_port;
^
/Users/tuntaposx/ip2socks/ip2socks-by-FlowerWrong/src/udp_raw.cpp:305:39: error: no member named 'remote_fake_port' in 'udp_pcb'; did you mean 'remote_port'?
sprintf(dns_port, "%d", upcb->remote_fake_port);
^~~~~~~~~~~~~~~~
remote_port
/Users/tuntaposx/ip2socks/ip2socks-by-FlowerWrong/lwip/src/include/lwip/udp.h:91:21: note: 'remote_port' declared here
u16_t local_port, remote_port;
^
/Users/tuntaposx/ip2socks/ip2socks-by-FlowerWrong/src/udp_raw.cpp:350:53: error: no member named 'remote_fake_port' in 'udp_pcb'; did you mean 'remote_port'?
if (strcmp("udp", conf->dns_mode) == 0 && upcb->remote_fake_port == atoi(conf->local_dns_port)) {
^~~~~~~~~~~~~~~~
remote_port
/Users/tuntaposx/ip2socks/ip2socks-by-FlowerWrong/lwip/src/include/lwip/udp.h:91:21: note: 'remote_port' declared here
u16_t local_port, remote_port;
^
/Users/tuntaposx/ip2socks/ip2socks-by-FlowerWrong/src/udp_raw.cpp:424:53: error: no member named 'remote_fake_port' in 'udp_pcb'; did you mean 'remote_port'?
if (strcmp("udp", conf->dns_mode) == 0 && upcb->remote_fake_port == atoi(conf->local_dns_port)) {
^~~~~~~~~~~~~~~~
remote_port
/Users/tuntaposx/ip2socks/ip2socks-by-FlowerWrong/lwip/src/include/lwip/udp.h:91:21: note: 'remote_port' declared here
u16_t local_port, remote_port;
^
/Users/tuntaposx/ip2socks/ip2socks-by-FlowerWrong/src/udp_raw.cpp:482:32: error: no member named 'remote_fake_ip' in 'udp_pcb'
inet_ntop(AF_INET, &(upcb->remote_fake_ip), remote_fake_ip_str, INET_ADDRSTRLEN);
~~~~ ^
/Users/tuntaposx/ip2socks/ip2socks-by-FlowerWrong/src/udp_raw.cpp:484:53: error: no member named 'remote_fake_port' in 'udp_pcb'; did you mean 'remote_port'?
if (strcmp("udp", conf->dns_mode) == 0 && upcb->remote_fake_port == atoi(conf->local_dns_port)) {
^~~~~~~~~~~~~~~~
remote_port
/Users/tuntaposx/ip2socks/ip2socks-by-FlowerWrong/lwip/src/include/lwip/udp.h:91:21: note: 'remote_port' declared here
u16_t local_port, remote_port;
^
/Users/tuntaposx/ip2socks/ip2socks-by-FlowerWrong/src/udp_raw.cpp:496:53: error: no member named 'remote_fake_port' in 'udp_pcb'; did you mean 'remote_port'?
if (strcmp("udp", conf->dns_mode) == 0 && upcb->remote_fake_port == atoi(conf->local_dns_port)) {
^~~~~~~~~~~~~~~~
remote_port
/Users/tuntaposx/ip2socks/ip2socks-by-FlowerWrong/lwip/src/include/lwip/udp.h:91:21: note: 'remote_port' declared here
u16_t local_port, remote_port;
^
/Users/tuntaposx/ip2socks/ip2socks-by-FlowerWrong/src/udp_raw.cpp:499:23: error: no member named 'remote_fake_port' in 'udp_pcb'; did you mean 'remote_port'?
pport = upcb->remote_fake_port;
^~~~~~~~~~~~~~~~
remote_port
/Users/tuntaposx/ip2socks/ip2socks-by-FlowerWrong/lwip/src/include/lwip/udp.h:91:21: note: 'remote_port' declared here
u16_t local_port, remote_port;
^
/Users/tuntaposx/ip2socks/ip2socks-by-FlowerWrong/src/udp_raw.cpp:538:53: error: no member named 'remote_fake_port' in 'udp_pcb'; did you mean 'remote_port'?
if (strcmp("udp", conf->dns_mode) == 0 && upcb->remote_fake_port == atoi(conf->local_dns_port)) {
^~~~~~~~~~~~~~~~
remote_port
/Users/tuntaposx/ip2socks/ip2socks-by-FlowerWrong/lwip/src/include/lwip/udp.h:91:21: note: 'remote_port' declared here
u16_t local_port, remote_port;
^
/Users/tuntaposx/ip2socks/ip2socks-by-FlowerWrong/src/udp_raw.cpp:546:53: error: no member named 'remote_fake_port' in 'udp_pcb'; did you mean 'remote_port'?
if (strcmp("udp", conf->dns_mode) == 0 && upcb->remote_fake_port == atoi(conf->local_dns_port)) {
^~~~~~~~~~~~~~~~
remote_port
/Users/tuntaposx/ip2socks/ip2socks-by-FlowerWrong/lwip/src/include/lwip/udp.h:91:21: note: 'remote_port' declared here
u16_t local_port, remote_port;
^
/Users/tuntaposx/ip2socks/ip2socks-by-FlowerWrong/src/udp_raw.cpp:549:23: error: no member named 'remote_fake_port' in 'udp_pcb'; did you mean 'remote_port'?
pport = upcb->remote_fake_port;
^~~~~~~~~~~~~~~~
remote_port
/Users/tuntaposx/ip2socks/ip2socks-by-FlowerWrong/lwip/src/include/lwip/udp.h:91:21: note: 'remote_port' declared here
u16_t local_port, remote_port;
^
4 warnings and 11 errors generated.
make[2]: *** [CMakeFiles/ip2socks.dir/src/udp_raw.cpp.o] Error 1
make[1]: *** [CMakeFiles/ip2socks.dir/all] Error 2
make: *** [all] Error 2

@johnnyhansen-away 用clash吧,我好久没维护了。抱歉。