Created attachment 227074 [details] Fix Disabling VIMAGE breaks kernel compilation with ../../../net/debugnet.c:778:1: error: expected identifier MTX_SYSINIT(debugnet_hwm_lock, &dn_hwm_lk, "Debugnet HWM lock", MTX_DEF); ^ ../../../sys/mutex.h:533:19: note: expanded from macro 'MTX_SYSINIT' mtx_sysinit, &name##_args); \ ^ ../../../net/debugnet.c:778:1: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int] ../../../sys/mutex.h:532:2: note: expanded from macro 'MTX_SYSINIT' SYSINIT(name##_mtx_sysinit, SI_SUB_LOCK, SI_ORDER_MIDDLE, \ ^ ../../../net/debugnet.c:778:1: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] ../../../sys/mutex.h:532:9: note: expanded from macro 'MTX_SYSINIT' SYSINIT(name##_mtx_sysinit, SI_SUB_LOCK, SI_ORDER_MIDDLE, \ ^ ../../../net/debugnet.c:778:1: error: expected identifier ../../../sys/mutex.h:535:20: note: expanded from macro 'MTX_SYSINIT' _mtx_destroy, __DEVOLATILE(void *, &(mtx)->mtx_lock)) ^ ../../../sys/cdefs.h:632:33: note: expanded from macro '__DEVOLATILE' #define __DEVOLATILE(type, var) ((type)(__uintptr_t)(volatile void *)(var)) ^ ../../../net/debugnet.c:778:1: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int] ../../../sys/mutex.h:534:2: note: expanded from macro 'MTX_SYSINIT' SYSUNINIT(name##_mtx_sysuninit, SI_SUB_LOCK, SI_ORDER_MIDDLE, \ ^ ../../../net/debugnet.c:778:1: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] ../../../sys/mutex.h:534:11: note: expanded from macro 'MTX_SYSINIT' SYSUNINIT(name##_mtx_sysuninit, SI_SUB_LOCK, SI_ORDER_MIDDLE, \ ^ ../../../net/debugnet.c:868:42: error: expected ')' SYSINIT(dn_evh_init, SI_SUB_EVENTHANDLER + 1, SI_ORDER_ANY, dn_evh_init, NULL); ^ ../../../net/debugnet.c:868:8: note: to match this '(' SYSINIT(dn_evh_init, SI_SUB_EVENTHANDLER + 1, SI_ORDER_ANY, dn_evh_init, NULL); ^ ../../../net/debugnet.c:868:1: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int] SYSINIT(dn_evh_init, SI_SUB_EVENTHANDLER + 1, SI_ORDER_ANY, dn_evh_init, NULL); ^ ../../../net/debugnet.c:868:9: error: a parameter list without types is only allowed in a function definition SYSINIT(dn_evh_init, SI_SUB_EVENTHANDLER + 1, SI_ORDER_ANY, dn_evh_init, NULL); ^ 9 errors generated. Steps to reproduce: use this kernel configuration file: include GENERIC ident FOO nooptions VIMAGE How to fix: add missing #include <sys/kernel.h> to /usr/src/sys/net/debugnet.c
FreeBSD fbsd130 13.0-RELEASE-p3 FreeBSD 13.0-RELEASE-p3 #0: Tue Jun 29 19:46:20 UTC 2021 root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64