Skip to content

Commit e01e6b1

Browse files
committed
clean(warnings): fix "MIN" redefined warning
Some platforms, like Zephyr, already define MIN and definition in WAMR cause `warning: "MIN" redefined` warning. Check if it was defined before, and do not redefine it. Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com>
1 parent 5c149d8 commit e01e6b1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/iwasm/libraries/lib-wasi-threads/tid_allocator.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
#include "bh_log.h"
99

1010
bh_static_assert(TID_MIN <= TID_MAX);
11+
/* Some platforms, like Zephyr, have already defined MIN at this point */
12+
#ifndef MIN
1113
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
14+
#endif
1215

1316
bool
1417
tid_allocator_init(TidAllocator *tid_allocator)

0 commit comments

Comments
 (0)