From 1039f9b531e57f710432073b2fd525d8ecb857c5 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sun, 20 Jun 2021 01:30:06 +0200 Subject: [PATCH] Workaround PRIu64 on Windows On Windows, PRIu64 is defined to "llu", which is not supported: error: unknown conversion type character 'l' in format --- app/src/control_msg.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/control_msg.c b/app/src/control_msg.c index aba4bd16..1257010e 100644 --- a/app/src/control_msg.c +++ b/app/src/control_msg.c @@ -170,7 +170,12 @@ control_msg_log(const struct control_msg *msg) { (long) msg->inject_touch_event.buttons); } else { // numeric pointer id - LOG_CMSG("touch [id=%" PRIu64 "] %-4s position=%" PRIi32 ",%" +#ifndef __WIN32 +# define PRIu64_ PRIu64 +#else +# define PRIu64_ "I64u" // Windows... +#endif + LOG_CMSG("touch [id=%" PRIu64_ "] %-4s position=%" PRIi32 ",%" PRIi32 " pressure=%g buttons=%06lx", id, MOTIONEVENT_ACTION_LABEL(action),