Opened 4 years ago

Closed 4 months ago

#61631 closed defect (fixed)

torsocks @2.3.0: 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: catalina bigsur monterey ventura sonoma haspatch Cc: ASGR71
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 (6)

comment:1 Changed 4 years 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 4 years ago by jmroot (Joshua Root)

Keywords: bigsur added; torsocks removed
Owner: set to sami.laine@…
Status: newassigned

comment:4 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ASGR71 added
Keywords: catalina monterey added
Summary: torsocks: error: implicit declaration of gethostbyaddr_r is invalid in C99torsocks @2.3.0: error: implicit declaration of gethostbyaddr_r is invalid in C99

Has duplicate #61944.

comment:5 Changed 4 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: ventura sonoma haspatch added

Fixed in https://github.com/macports/macports-ports/pull/25170 along with updating to 2.4.0. Sami, let us know if we may merge that PR, or if you no longer want to maintain this port let us know that too.

comment:6 Changed 4 months ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

In 254840fbc94b00dc2767f11885935ce667b76cb1/macports-ports (master):

torsocks: Update to 2.4.0

Closes: #61631

Note: See TracTickets for help on using tickets.