Skip to content

Commit 8c19835

Browse files
committed
GCC10 Compile Fix
GCC10 made `-fno-common` a default flag and for a slightly confusing reason this leads to the compiler complaining about multiple definitions of the keyboard_cmd enum. Work around that by merging the declaration of the enum into the typedef of `keyboard_cmd_t`. Ref.: https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common Signed-off-by: Bjoern Doebel <[email protected]>
1 parent 30acb04 commit 8c19835

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

include/drivers/keyboard.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
#define KEYBOARD_STATUS_OUT_FULL 0x01 /* bit set when the keyboard buffer is full */
4040

41-
enum {
41+
typedef enum {
4242
KEYBOARD_CMD_WRITE_CONFIGURATION = 0x60, /* Write configuration byte */
4343
KEYBOARD_CMD_READ_CONFIGURATION = 0x20, /* Read configuration byte */
4444
KEYBOARD_CMD_SELF_TEST = 0xAA,
@@ -48,8 +48,7 @@ enum {
4848
KEYBOARD_CMD_DISABLE_PORT_2 = 0xA7,
4949
KEYBOARD_CMD_ENABLE_PORT_1 = 0xAE,
5050
KEYBOARD_CMD_ENABLE_PORT_2 = 0xA8,
51-
} keyboard_cmd;
52-
typedef enum keyboard_cmd keyboard_cmd_t;
51+
} keyboard_cmd_t;
5352

5453
#define KEYBOARD_RES_SELF_TEST 0x55
5554

0 commit comments

Comments
 (0)