--- defs.h	2024-04-06 17:43:46.000000000 +0800
+++ defs.h	2024-04-24 02:51:02.000000000 +0800
@@ -45,6 +45,9 @@
 /* Also, define a LEGACY_WINDOWS flag to enable other workarounds */
 #define LEGACY_WINDOWS
 #else
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS
+#endif
 #include <inttypes.h>
 /* Because we still support older MSVC libraries which don't recognise the
  * standard C "z" modifier for size_t-sized integers, we must use an

--- test/sclog/sclog.c	2024-04-06 17:43:48.000000000 +0800
+++ test/sclog/sclog.c	2024-04-24 02:46:43.000000000 +0800
@@ -6,6 +6,10 @@
  * the top of testsc.c.
  */
 
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS
+#endif
+
 #include <inttypes.h>
 #include <string.h>
 
