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

Test libtest1960 fails to compile on FreeBSD 14.2 #16184

Closed
CueXXIII opened this issue Feb 5, 2025 · 1 comment
Closed

Test libtest1960 fails to compile on FreeBSD 14.2 #16184

CueXXIII opened this issue Feb 5, 2025 · 1 comment
Assignees

Comments

@CueXXIII
Copy link

CueXXIII commented Feb 5, 2025

I did this

$ make check
  CC       lib1960.o
lib1960.c:66:22: error: variable has incomplete type 'struct sockaddr_in'
   66 |   struct sockaddr_in serv_addr;
      |                      ^
lib1960.c:66:10: note: forward declaration of 'struct sockaddr_in'
   66 |   struct sockaddr_in serv_addr;
      |          ^
1 error generated.
*** Error code 1

I expected the following

Commit a3585c9 removed #include <netinet/in.h> from tests/libtest/lib1960.c which still is needed on FreeBSD. After adding that include, lib1960.c successfully compiles and make check reports 100% tests OK.

Although I think that include should be in inet_pton.h with appropriate #ifdef checks.

curl/libcurl version

curl 8.12.0 (x86_64-unknown-freebsd14.2) libcurl/8.12.0 GnuTLS/3.8.8 zlib/1.3.1 libidn2/2.3.7 libpsl/0.21.5 nghttp2/1.64.0
Release-Date: 2025-02-05
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS HSTS HTTP2 HTTPS-proxy IDN IPv6 Largefile libz NTLM PSL SSL threadsafe TLS-SRP UnixSockets

operating system

FreeBSD wachtel.zoo 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64

@vszakats
Copy link
Member

vszakats commented Feb 5, 2025

Thanks for your report.

Till fixing, the workaround is to build curl with
./configure --enable-test-bundles (or -DCURL_TEST_BUNDLES=ON with cmake).

Tests will also build much faster with this set.

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

Successfully merging a pull request may close this issue.

3 participants