Skip to content

Commit

Permalink
fix the macro conflict with sys/_types/_key_t.h on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
silver-ymz committed Feb 4, 2023
1 parent 1efb4b7 commit 48b4860
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/device/keyboard.c
Expand Up @@ -33,6 +33,11 @@ f(UP) f(DOWN) f(LEFT) f(RIGHT) f(INSERT) f(DELETE) f(HOME) f(END) f(PAGEUP) f(PA

#define _KEY_NAME(k) _KEY_##k,

// It's conflicted on macos with sys/_types/_key_t.h
#ifdef __APPLE__
#undef _KEY_T
#endif

enum {
_KEY_NONE = 0,
MAP(_KEYS, _KEY_NAME)
Expand Down

0 comments on commit 48b4860

Please sign in to comment.