Bug 269849

Summary: Compile error for sys/dev/atkbdc/psm.c when specifying KBD_DELAY1 and/or KBD_DELAY2 in kernel configuration file
Product: Base System Reporter: Trond Endrestøl <Trond.Endrestol>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Some People CC: marklmi26-fbsd
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch for sys/dev/atkbdc/psm.c ensuring KBD_DELAY1 and/or KBD_DELAY2 are defined as early as possible none

Description Trond Endrestøl 2023-02-27 10:11:57 UTC
Created attachment 240442 [details]
Patch for sys/dev/atkbdc/psm.c ensuring KBD_DELAY1 and/or KBD_DELAY2 are defined as early as possible

Those who specify KBD_DELAY1 and/or KBD_DELAY2 in their kernel configuration files, end up with these error messages:

--- psm.o ---
In file included from /usr/src/sys/dev/atkbdc/psm.c:100:
In file included from /usr/src/sys/dev/atkbdc/atkbdcreg.h:39:
./opt_kbd.h:1:9: error: 'KBD_DELAY1' macro redefined [-Werror,-Wmacro-redefined]
#define KBD_DELAY1 200
        ^
/usr/src/sys/dev/kbd/kbdreg.h:155:9: note: previous definition is here
#define KBD_DELAY1      500
        ^
In file included from /usr/src/sys/dev/atkbdc/psm.c:100:
In file included from /usr/src/sys/dev/atkbdc/atkbdcreg.h:39:
./opt_kbd.h:3:9: error: 'KBD_DELAY2' macro redefined [-Werror,-Wmacro-redefined]
#define KBD_DELAY2 15
        ^
/usr/src/sys/dev/kbd/kbdreg.h:158:9: note: previous definition is here
#define KBD_DELAY2      100
        ^
2 errors generated.
Comment 1 Mark Millard 2023-02-27 17:09:15 UTC
Warner L. committed a fix. It is visible via:

https://lists.freebsd.org/archives/dev-commits-src-main/2023-February/013252.html