]> git.kaiwu.me - nginx.git/commitdiff
Events: compatibility with NetBSD 10.0 in kqueue.
authorSergey Kandaurov <pluknet@nginx.com>
Thu, 10 Jul 2025 12:59:05 +0000 (16:59 +0400)
committerSergey Kandaurov <s.kandaurov@f5.com>
Tue, 23 Dec 2025 18:40:33 +0000 (22:40 +0400)
The kevent udata field was changed from intptr_t to "void *",
similar to other BSDs and Darwin.

The NGX_KQUEUE_UDATA_T macro is adjusted to reflect that change,
fixing -Werror=int-conversion errors.

src/event/modules/ngx_kqueue_module.c

index 2ed862e9e1ea4104cfbcdc549f81af92819050e5..0c905eff3d437a2ebc6f0e2566d82e357533f150 100644 (file)
@@ -10,9 +10,9 @@
 #include <ngx_event.h>
 
 
-/* NetBSD 2.0 incompatibly defines kevent.udata as "intptr_t" */
+/* NetBSD up to 10.0 incompatibly defines kevent.udata as "intptr_t" */
 
-#if (__NetBSD__)
+#if (__NetBSD__ && __NetBSD_Version__ < 1000000000)
 #define NGX_KQUEUE_UDATA_T
 #else
 #define NGX_KQUEUE_UDATA_T  (void *)