Opened 2 months ago

Last modified 3 weeks ago

#61631 assigned defect

torsocks: error: implicit declaration of gethostbyaddr_r is invalid in C99

Reported by: arrigo (Arrigo) Owned by: sami.laine@…
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: bigsur Cc:
Port: torsocks

Description

The torsocks port fails to compile under macOS 11.0.1 with the following error from the logs:

:info:build make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_torsocks/torsocks/work/torsocks-2.3.0/tests'
:info:build   CC       test_dns.o
:info:build   CC       helpers.o
:info:build   CC       test_socket.o
:info:build   CC       test_connect.o
:info:build   CC       test_fd_passing.o
:info:build   CC       test_getpeername.o
:info:build test_dns.c:95:11: error: implicit declaration of function 'gethostbyaddr_r' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
:info:build         result = gethostbyaddr_r((const void *)&addr,
:info:build                  ^
:info:build test_dns.c:95:11: note: did you mean 'gethostbyaddr'?
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/usr/include/netdb.h:274:17: note: 'gethostbyaddr' declared here
:info:build struct hostent  *gethostbyaddr(const void *, socklen_t, int);
:info:build                  ^
:info:build test_dns.c:114:11: error: implicit declaration of function 'gethostbyaddr_r' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
:info:build         result = gethostbyaddr_r((const void *)&addr,
:info:build                  ^
:info:build 2 errors generated.
:info:build make[2]: *** [test_dns.o] Error 1

Xcode details:

Apple clang version 12.0.0 (clang-1200.0.32.27)
Target: x86_64-apple-darwin20.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Change History (3)

comment:1 Changed 2 months ago by arrigo (Arrigo)

Summary: torsocks: fails to compile under macOS 11.0.1torsocks: error: implicit declaration of gethostbyaddr_r is invalid in C99

comment:2 Changed 2 months ago by jmroot (Joshua Root)

Keywords: bigsur added; torsocks removed
Owner: set to sami.laine@…
Status: newassigned
Note: See TracTickets for help on using tickets.