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.
Undeclared function 'eventfd error in socketpair
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Abhinav Singhal via curl-library <curl-library_at_lists.haxx.se>
Date: Sun, 30 Mar 2025 15:31:56 -0400
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
Date: Sun, 30 Mar 2025 15:31:56 -0400
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.htmlReceived on 2025-03-30