]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Add platform check for netinet/tcp.h include
authorVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 22 Oct 2025 07:49:50 +0000 (08:49 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 22 Oct 2025 10:17:46 +0000 (11:17 +0100)
Wrap netinet/tcp.h include in HAVE_NETINET_TCP_H check for better
portability across different platforms that may not have this header.

src/plugins/fuzzy_check.c

index a744d2c2093c44d9712c3dec6bc99d5ea886759d..3a0270807f233507402d169f426232e8a7e3b548 100644 (file)
 #include <math.h>
 #include "libutil/libev_helper.h"
 
+#ifdef HAVE_NETINET_TCP_H
+#include <netinet/tcp.h> /* for TCP_NODELAY */
+#endif
+
 #define DEFAULT_SYMBOL "R_FUZZY_HASH"
 #define RSPAMD_FUZZY_SYMBOL_FORBIDDEN "FUZZY_FORBIDDEN"
 #define RSPAMD_FUZZY_SYMBOL_RATELIMITED "FUZZY_RATELIMITED"