Welcome! Log In Create A New Profile

Advanced

[nginx] Configure: fixed --test-build-epoll on FreeBSD 13.

Maxim Dounin
April 05, 2021 02:22PM
details: https://hg.nginx.org/nginx/rev/e2e9e0fae747
branches:
changeset: 7818:e2e9e0fae747
user: Maxim Dounin <mdounin@mdounin.ru>
date: Mon Apr 05 20:14:16 2021 +0300
description:
Configure: fixed --test-build-epoll on FreeBSD 13.

In FreeBSD 13, eventfd(2) was added, and this breaks build
with --test-build-epoll and without --with-file-aio. Fix is
to move eventfd(2) detection to auto/os/linux, as it is used
only on Linux as a notification mechanism for epoll().

diffstat:

auto/os/linux | 25 +++++++++++++++++++++++++
auto/unix | 23 -----------------------
2 files changed, 25 insertions(+), 23 deletions(-)

diffs (68 lines):

diff -r c297c2c252d8 -r e2e9e0fae747 auto/os/linux
--- a/auto/os/linux Mon Apr 05 04:07:17 2021 +0300
+++ b/auto/os/linux Mon Apr 05 20:14:16 2021 +0300
@@ -86,6 +86,31 @@ if [ $ngx_found = yes ]; then
ee.data.ptr = NULL;
epoll_ctl(efd, EPOLL_CTL_ADD, fd, &ee)"
. auto/feature
+
+
+ # eventfd()
+
+ ngx_feature="eventfd()"
+ ngx_feature_name="NGX_HAVE_EVENTFD"
+ ngx_feature_run=no
+ ngx_feature_incs="#include <sys/eventfd.h>"
+ ngx_feature_path=
+ ngx_feature_libs=
+ ngx_feature_test="(void) eventfd(0, 0)"
+ . auto/feature
+
+ if [ $ngx_found = yes ]; then
+ have=NGX_HAVE_SYS_EVENTFD_H . auto/have
+ fi
+
+
+ if [ $ngx_found = no ]; then
+
+ ngx_feature="eventfd() (SYS_eventfd)"
+ ngx_feature_incs="#include <sys/syscall.h>"
+ ngx_feature_test="(void) SYS_eventfd"
+ . auto/feature
+ fi
fi


diff -r c297c2c252d8 -r e2e9e0fae747 auto/unix
--- a/auto/unix Mon Apr 05 04:07:17 2021 +0300
+++ b/auto/unix Mon Apr 05 20:14:16 2021 +0300
@@ -582,29 +582,6 @@ Currently file AIO is supported on FreeB
END
exit 1
fi
-
-else
-
- ngx_feature="eventfd()"
- ngx_feature_name="NGX_HAVE_EVENTFD"
- ngx_feature_run=no
- ngx_feature_incs="#include <sys/eventfd.h>"
- ngx_feature_path=
- ngx_feature_libs=
- ngx_feature_test="(void) eventfd(0, 0)"
- . auto/feature
-
- if [ $ngx_found = yes ]; then
- have=NGX_HAVE_SYS_EVENTFD_H . auto/have
- fi
-
- if [ $ngx_found = no ]; then
-
- ngx_feature="eventfd() (SYS_eventfd)"
- ngx_feature_incs="#include <sys/syscall.h>"
- ngx_feature_test="(void) SYS_eventfd"
- . auto/feature
- fi
fi


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Configure: fixed --test-build-epoll on FreeBSD 13.

Maxim Dounin 417 April 05, 2021 02:22PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 265
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready