]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] FreeBSD 15 inotify build compatibility 5783/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Mon, 8 Dec 2025 08:02:08 +0000 (11:02 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Mon, 8 Dec 2025 08:02:08 +0000 (11:02 +0300)
FreeBSD 15.0 introduced native inotify support, which causes
libev to enable EV_USE_INOTIFY. On FreeBSD, struct statfs is
defined in <sys/mount.h> rather than <sys/statfs.h>.

Note: This fix obsoletes the corresponding patch file in the
FreeBSD `mail/rspamd` and `mail/rspamd-devel` ports.

contrib/libev/ev.c

index 0dec50bcdbc87c19792a665a03bde19ab80cb57f..63ab289302ad1bd3321a5fac65b0d2c279073891 100644 (file)
 #endif
 
 #if EV_USE_INOTIFY
+# ifdef __FreeBSD__
+# include <sys/mount.h>
+# else
 # include <sys/statfs.h>
+# endif
 # include <sys/inotify.h>
 /* some very old inotify.h headers don't have IN_DONT_FOLLOW */
 # ifndef IN_DONT_FOLLOW