Skip to content

Commit ff4c1eb

Browse files
committed
Conditionally include stdio.h
The header `stdio.h` is only needed in code ifdef guarded by `USE_EXTERNAL_DEFAULT_CALLBACKS` and also (indirectly) by `VERIFY`, we can therefore guard the include statement in the same manner. The reason for doing this as that wasm builds downstream have to patch in an empty `stdio.h` file in order to build because of the unconditional include.
1 parent a43e982 commit ff4c1eb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/util.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,16 @@
1313

1414
#include <stdlib.h>
1515
#include <stdint.h>
16-
#include <stdio.h>
1716
#include <limits.h>
1817

18+
#ifndef USE_EXTERNAL_DEFAULT_CALLBACKS
19+
#include <stdio.h>
20+
#endif
21+
22+
#ifdef VERIFY
23+
#include <stdio.h>
24+
#endif
25+
1926
#define STR_(x) #x
2027
#define STR(x) STR_(x)
2128
#define DEBUG_CONFIG_MSG(x) "DEBUG_CONFIG: " x

0 commit comments

Comments
 (0)