keycodes.c compilation error - src/keycodes.c:169:32: error: ‘KEY_ROTATE_DISPLAY’ undeclared here (not in a function)
adrelanos opened this issue · comments
gcc src/main.c src/keycodes.c -o kloak -lm -lpthread
src/keycodes.c:169:32: error: ‘KEY_ROTATE_DISPLAY’ undeclared here (not in a function)
{"KEY_ROTATE_DISPLAY", KEY_ROTATE_DISPLAY},
^
src/keycodes.c: In function ‘lookup_keycode’:
src/keycodes.c:278:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (item_t *p = table; p->name != NULL; ++p) {
^
src/keycodes.c:278:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
src/keycodes.c: In function ‘lookup_keyname’:
src/keycodes.c:287:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (item_t *p = table; p->name != NULL; ++p) {
^
Makefile:4: recipe for target 'kloak' failed
make: *** [kloak] Error 1
Thanks, I used the #defs in "input-event-codes.h" to generate that table. I'm guessing some of those keys were specific to my kernel version. I'll remove the non-standard keys - I think most rescue combos won't include keys like "rotate display" or "forward mail"...
Should be fixed in 3613eb9 (and the prev commit), can you verify compilation on your machine?
Compilation works for me.
Great, thanks.