curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder Daniel himself.

Re: Undeclared function 'eventfd error in socketpair

From: Henrik Holst via curl-library <curl-library_at_lists.haxx.se>
Date: Sun, 30 Mar 2025 22:22:01 +0200

considering that all errors are reported from socketpair.c I would first
try and remove the "--disable-socketpair" flag from configure to see if
that would help.

/HH

Den sön 30 mars 2025 kl 21:32 skrev Abhinav Singhal via curl-library <
curl-library_at_lists.haxx.se>:

> Hi,
>
> I currently have curl 8.7 installed (built with openssl) and I’m trying to
> upgrade to 8.12.1. However, I’m running into the following error:
>
>
>
> ../../../../../distro/lib/socketpair.c:37:13: error: call to undeclared
> function 'eventfd'; ISO C99 and later do not support implicit function
> declarations [-Wimplicit-function-declaration]
>
> 37 | int efd = eventfd(0, nonblocking ? EFD_CLOEXEC | EFD_NONBLOCK :
> EFD_CLOEXEC);
>
> | ^
>
> ../../../../../distro/lib/socketpair.c:37:38: error: use of undeclared
> identifier 'EFD_CLOEXEC'
>
> 37 | int efd = eventfd(0, nonblocking ? EFD_CLOEXEC | EFD_NONBLOCK :
> EFD_CLOEXEC);
>
> | ^
>
> ../../../../../distro/lib/socketpair.c:37:52: error: use of undeclared
> identifier 'EFD_NONBLOCK'
>
> 37 | int efd = eventfd(0, nonblocking ? EFD_CLOEXEC | EFD_NONBLOCK :
> EFD_CLOEXEC);
>
> | ^
>
> ../../../../../distro/lib/socketpair.c:37:67: error: use of undeclared
> identifier 'EFD_CLOEXEC'
>
> 37 | int efd = eventfd(0, nonblocking ? EFD_CLOEXEC | EFD_NONBLOCK :
> EFD_CLOEXEC);
>
> | ^
>
> 4 errors generated.
>
> Makefile:3061: recipe for target 'libcurl_la-socketpair.lo' failed
>
>
>
> --
>
>
>
> On further investigation, I found that the following change was introduced
> with curl release 8.11.1, which is most likely the cause of the above
> failure:
>
> socketpair: fix enabling `USE_EVENTFD` [30]
>
>
>
>
>
> The following are the libcurl flags in my configuration:
>
> --disable-bearer-auth
>
> --disable-dateparse
>
> --disable-dict
>
> --disable-ech
>
> --disable-gopher
>
> --disable-headers-api
>
> --disable-hsts
>
> --disable-imap
>
> --disable-mime
>
> --disable-mqtt
>
> --disable-negotiate-auth
>
> --disable-ntlm-wb
>
> --disable-pop3
>
> --disable-rtsp
>
> --disable-sspi
>
> --disable-telnet
>
> --disable-tls-srp
>
> --disable-unix-sockets
>
> --disable-websockets
>
> --disable-socketpair
>
> --enable-ipv6
>
> --prefix=/usr
>
> --with-openssl
>
> --with-random=/dev/urandom
>
> --without-brotli
>
> --without-f77
>
> --without-fish-functions-dir
>
> --without-g77
>
> --without-hyper
>
> --without-libidn2
>
> --without-libpsl
>
> --without-librtmp
>
> --without-libssh2
>
> --without-msh3
>
> --without-nghttp2
>
> --without-nghttp3
>
> --without-ngtcp2
>
> --without-openssl-quic
>
> --without-quiche
>
> --without-winidn
>
> --without-zlib
>
> --without-zsh-functions-dir
>
> --without-zstd
>
>
>
>
>
> How may I get past this issue? Should I enable some of the above
> components in order to get past the compilation errors?
>
> Thanks.
> --
> Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
> Etiquette: https://curl.se/mail/etiquette.html
>


-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2025-03-30