From 48b4860cef80073dbac7b8d980c8d3b90f9bf152 Mon Sep 17 00:00:00 2001 From: salvor Date: Sat, 4 Feb 2023 09:17:12 +0800 Subject: [PATCH] fix the macro conflict with sys/_types/_key_t.h on macos --- src/device/keyboard.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/device/keyboard.c b/src/device/keyboard.c index b0ab0338..776a3a17 100644 --- a/src/device/keyboard.c +++ b/src/device/keyboard.c @@ -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)