From 52df89ced31a5685d37e17c62ccccd3db5aa3e62 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 31 Dec 2020 13:51:50 +0000 Subject: syscall: SFD_NONBLOCK can be a constant, again Since Perl exposes O_NONBLOCK as a constant, we can safely make SFD_NONBLOCK a constant, too. This is not the case for SFD_CLOEXEC, since O_CLOEXEC is not exposed by Perl despite being used internally in the interpreter. --- lib/PublicInbox/Syscall.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/Syscall.pm') diff --git a/lib/PublicInbox/Syscall.pm b/lib/PublicInbox/Syscall.pm index c403f78a..180ee2cc 100644 --- a/lib/PublicInbox/Syscall.pm +++ b/lib/PublicInbox/Syscall.pm @@ -22,7 +22,7 @@ our @EXPORT_OK = qw(epoll_ctl epoll_create epoll_wait EPOLLIN EPOLLOUT EPOLLET EPOLL_CTL_ADD EPOLL_CTL_DEL EPOLL_CTL_MOD EPOLLONESHOT EPOLLEXCLUSIVE - signalfd $SFD_NONBLOCK); + signalfd SFD_NONBLOCK); our %EXPORT_TAGS = (epoll => [qw(epoll_ctl epoll_create epoll_wait EPOLLIN EPOLLOUT EPOLL_CTL_ADD EPOLL_CTL_DEL EPOLL_CTL_MOD @@ -67,7 +67,7 @@ our ( ); my $SFD_CLOEXEC = 02000000; # Perl does not expose O_CLOEXEC -our $SFD_NONBLOCK = O_NONBLOCK; +sub SFD_NONBLOCK () { O_NONBLOCK } our $no_deprecated = 0; if ($^O eq "linux") { -- cgit v1.2.3-24-ge0c7