From b985a31b0a2fbc88b069bd9406d99a56972d6bce Mon Sep 17 00:00:00 2001 From: David Carlier Date: Fri, 5 Jan 2024 18:53:49 +0000 Subject: [PATCH] sapi/fpm: setting backlog default to -1 for DragonFlyBSD. like most of BSD, when negative the syscall sets it internally to SOMAXCONN. close GH-13077 --- NEWS | 2 ++ sapi/fpm/fpm/fpm_sockets.h | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index b5a58fd7a1f..b171b9cc2c0 100644 --- a/NEWS +++ b/NEWS @@ -26,6 +26,8 @@ DOM: FPM: . Implement GH-12385 (flush headers without body when calling flush()). (nielsdos) + . Added DragonFlyBSD system to the list which set FPM_BACKLOG_DEFAULT + to SOMAXCONN. (David Carlier) FTP: . Removed the deprecated inet_ntoa call support. (David Carlier) diff --git a/sapi/fpm/fpm/fpm_sockets.h b/sapi/fpm/fpm/fpm_sockets.h index 94d903ca455..c9b708fdf75 100644 --- a/sapi/fpm/fpm/fpm_sockets.h +++ b/sapi/fpm/fpm/fpm_sockets.h @@ -15,9 +15,10 @@ #include "fpm_worker_pool.h" /* - On Linux, FreeBSD, OpenBSD and macOS, backlog negative values are truncated to SOMAXCONN + On Linux, FreeBSD, OpenBSD, DragonFlyBSD and macOS, backlog negative values are truncated to SOMAXCONN */ -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__linux__) || defined(__APPLE__) +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__linux__) || \ + defined(__DragonFly__) || defined(__APPLE__) #define FPM_BACKLOG_DEFAULT -1 #else #define FPM_BACKLOG_DEFAULT 511