about summary refs log tree commit homepage
path: root/lib/PublicInbox/Daemon.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-10-03 09:26:01 +0000
committerEric Wong <e@80x24.org>2023-10-03 10:16:11 +0000
commit60a3a95cea89b7f4a28b4b663897a07b7d4bf98a (patch)
tree4e6984e2f0070e7a7805d4335868106348e0627e /lib/PublicInbox/Daemon.pm
parentad722a4e32af5e2889be819b49ef31ecee4c3f2b (diff)
downloadpublic-inbox-60a3a95cea89b7f4a28b4b663897a07b7d4bf98a.tar.gz
NetBSD 5.0+ has accept filter support from FreeBSD; and I
I think we can assume all NetBSD is 5.0+ (released in 2009)
nowadays if we're already depending on Perl 5.12 from 2010.
Diffstat (limited to 'lib/PublicInbox/Daemon.pm')
-rw-r--r--lib/PublicInbox/Daemon.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/Daemon.pm b/lib/PublicInbox/Daemon.pm
index 07883153..7546105e 100644
--- a/lib/PublicInbox/Daemon.pm
+++ b/lib/PublicInbox/Daemon.pm
@@ -641,7 +641,7 @@ sub defer_accept ($$) {
                 my $sec = unpack('i', $x);
                 return if $sec > 0; # systemd users may set a higher value
                 setsockopt($s, IPPROTO_TCP, $TCP_DEFER_ACCEPT, 1);
-        } elsif ($^O eq 'freebsd') {
+        } elsif ($^O =~ /\A(?:freebsd|netbsd)\z/) {
                 my $x = getsockopt($s, SOL_SOCKET, $SO_ACCEPTFILTER);
                 return if defined $x; # don't change if set
                 my $accf_arg = pack('a16a240', $af_name, '');