Undeclared function 'eventfd error in socketpair

Abhinav Singhal via curl-library <[email protected]>
Newsgroups gmane.comp.web.curl.library
Message-ID <CAFdVh1xvr0Cv5=ZBCcpKExDWQaRvxah_iry6WFGywZ-Th5D36g@mail.gmail.com>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.