Missing #include <sys/eventhandler.h> in sys/net/route/nhop_ctl.c
Ian FREISLICH <[email protected]> Sun, 12 Jul 2026 11:00:59 -0400
| Newsgroups | gmane.os.freebsd.current |
|---|---|
| Message-ID | <[email protected]> |
Change d05d1f2560823 introduces this build error with my custom kernel
config:
/usr/src/sys/net/route/nhop_ctl.c:114:2: error: call to
undeclared function 'EVENTHANDLER_REGISTER'; ISO C99 and later do not
support implicit function declarations
[-Werror,-Wimplicit-function-declaration]
114 | EVENTHANDLER_REGISTER(ifnet_event, nhops_ifnet_event, NULL,
| ^
/usr/src/sys/net/route/nhop_ctl.c:114:24: error: use of
undeclared identifier 'ifnet_event'
114 | EVENTHANDLER_REGISTER(ifnet_event, nhops_ifnet_event, NULL,
| ^~~~~~~~~~~
/usr/src/sys/net/route/nhop_ctl.c:115:6: error: use of
undeclared identifier 'EVENTHANDLER_PRI_ANY'
115 | EVENTHANDLER_PRI_ANY);
| ^~~~~~~~~~~~~~~~~~~~
/usr/src/sys/net/route/nhop_ctl.c:116:24: error: use of
undeclared identifier 'ifnet_link_event'
116 | EVENTHANDLER_REGISTER(ifnet_link_event,
nhops_ifnet_link_event, NULL,
| ^~~~~~~~~~~~~~~~
/usr/src/sys/net/route/nhop_ctl.c:117:6: error: use of
undeclared identifier 'EVENTHANDLER_PRI_ANY'
117 | EVENTHANDLER_PRI_ANY);
| ^~~~~~~~~~~~~~~~~~~~
Adding the missing include resolves the error.
Ian