Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Aug 2021 09:15:26 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 257732] Kernel does not compile if VIMAGE is disabled
Message-ID:  <bug-257732-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D257732

            Bug ID: 257732
           Summary: Kernel does not compile if VIMAGE is disabled
           Product: Base System
           Version: 13.0-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: 606u@dir.bg

Created attachment 227074
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D227074&action=
=3Dedit
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, NU=
LL);
                                         ^
../../../net/debugnet.c:868:8: note: to match this '('
SYSINIT(dn_evh_init, SI_SUB_EVENTHANDLER + 1, SI_ORDER_ANY, dn_evh_init, NU=
LL);
       ^
../../../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, NU=
LL);
^
../../../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, NU=
LL);
        ^
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

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-257732-227>