]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib:replace: rely on epoll_create1() for epoll interface
authorDmitry Antipov <dantipov@cloudlinux.com>
Fri, 7 Apr 2023 11:42:10 +0000 (14:42 +0300)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 19 Jul 2023 08:02:33 +0000 (08:02 +0000)
Prefer epoll_create1(2) over epoll_create(2) and
always require the former to use epoll(7) interface.

Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/replace/wscript

index 199e636aa022e2cff5e485f92620eb25299270c3..37d775939003b2b9d4070b7a67df6511edf3224c 100644 (file)
@@ -487,7 +487,7 @@ def configure(conf):
     conf.CHECK_FUNCS('gai_strerror get_current_dir_name')
     conf.CHECK_FUNCS('timegm getifaddrs freeifaddrs mmap setgroups syscall setsid')
     conf.CHECK_FUNCS('getgrent_r getgrgid_r getgrnam_r getgrouplist getpagesize')
-    conf.CHECK_FUNCS('getpwent_r getpwnam_r getpwuid_r epoll_create')
+    conf.CHECK_FUNCS('getpwent_r getpwnam_r getpwuid_r epoll_create1')
     conf.CHECK_FUNCS('getprogname')
     if not conf.CHECK_FUNCS('copy_file_range'):
         conf.CHECK_CODE('''
@@ -710,7 +710,7 @@ syscall(SYS_copy_file_range,0,NULL,0,NULL,0,0);
     conf.CHECK_DECLS('getgrent_r getpwent_r', reverse=True, headers='pwd.h grp.h')
     conf.CHECK_DECLS('pread pwrite setenv setresgid setresuid', reverse=True)
 
-    if conf.CONFIG_SET('HAVE_EPOLL_CREATE') and conf.CONFIG_SET('HAVE_SYS_EPOLL_H'):
+    if conf.CONFIG_SET('HAVE_EPOLL_CREATE1') and conf.CONFIG_SET('HAVE_SYS_EPOLL_H'):
         conf.DEFINE('HAVE_EPOLL', 1)
 
     if conf.CHECK_FUNCS('eventfd', headers='sys/eventfd.h'):