diff options
author | Eric Wong <e@80x24.org> | 2020-12-31 13:51:50 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-01-01 05:00:40 +0000 |
commit | 52df89ced31a5685d37e17c62ccccd3db5aa3e62 (patch) | |
tree | 3b36d49255b646c1a7c80159db279e20c51979b3 /lib/PublicInbox/Syscall.pm | |
parent | d59a9cb667f106b29363795539b55116077bcd80 (diff) | |
download | public-inbox-52df89ced31a5685d37e17c62ccccd3db5aa3e62.tar.gz |
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.
Diffstat (limited to 'lib/PublicInbox/Syscall.pm')
-rw-r--r-- | lib/PublicInbox/Syscall.pm | 4 |
1 files changed, 2 insertions, 2 deletions
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") { |