File tree 2 files changed +32
-0
lines changed
2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,33 @@ if (HAVE_PRAGMA_STDC_FENV_ACCESS)
147
147
target_compile_definitions (libAtomVM PUBLIC HAVE_PRAGMA_STDC_FENV_ACCESS)
148
148
endif ()
149
149
150
+ # workaround for gcc-arm-none-eabi package issue
151
+ # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1067692
152
+ check_c_source_compiles("
153
+ #include <inttypes.h>
154
+ #include <stdio.h>
155
+ int main() {
156
+ printf(\" %\" PRIu64, (uint64_t) 42);
157
+ return 0;
158
+ }
159
+ " PRIU64_WORKS)
160
+
161
+ if (NOT PRIU64_WORKS)
162
+ check_c_source_compiles("
163
+ #include <sys/_stdint.h>
164
+ #include <inttypes.h>
165
+ #include <stdio.h>
166
+ int main() {
167
+ printf(\" %\" PRIu64, (uint64_t) 42);
168
+ return 0;
169
+ }
170
+ " PRIU64_REQUIRES_WORKAROUND)
171
+
172
+ if (PRIU64_REQUIRES_WORKAROUND)
173
+ target_compile_definitions (libAtomVM PUBLIC REQUIRES_SYS_STDINT_FOR_PRIU64)
174
+ endif ()
175
+ endif ()
176
+
150
177
if (${CMAKE_C_FLAGS} MATCHES -DAVM_NO_SMP)
151
178
message ("SMP is disabled by CFLAGS environment" )
152
179
set (AVM_DISABLE_SMP ON )
Original file line number Diff line number Diff line change 28
28
#ifndef _TERM_H_
29
29
#define _TERM_H_
30
30
31
+ #if REQUIRES_SYS_STDINT_FOR_PRIU64
32
+ #include <sys/_stdint.h>
33
+ #include <inttypes.h>
34
+ #endif
35
+
31
36
#include <stdbool.h>
32
37
#include <stdint.h>
33
38
#include <stdio.h>
You can’t perform that action at this time.
0 commit comments