Skip to content

Commit eb3cdaa

Browse files
authored
Fix macro redifinition warning for NuttX (#1250)
Fix the following warning introduced by the recent change. ``` In file included from wamr/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/locking.h:17, from wamr/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.h:18, from wamr/core/iwasm/aot/../common/wasm_runtime_common.h:18, from wamr/core/iwasm/aot/aot_runtime.h:10, from wamr/core/iwasm/aot/aot_loader.c:6: wamr/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/ssp_config.h:55: error: "CONFIG_HAS_ISATTY" redefined [-Werror] #define CONFIG_HAS_ISATTY 1 In file included from wamr/core/shared/utils/../platform/include/platform_common.h:13, from wamr/core/shared/utils/bh_platform.h:9, from wamr/core/iwasm/aot/aot_runtime.h:9, from wamr/core/iwasm/aot/aot_loader.c:6: wamr/core/shared/platform/nuttx/platform_internal.h:75: note: this is the location of the previous definition #define CONFIG_HAS_ISATTY 0 ```
1 parent 114bf94 commit eb3cdaa

File tree

1 file changed

+6
-0
lines changed
  • core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src

1 file changed

+6
-0
lines changed

core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/ssp_config.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,17 @@
5151
#define CONFIG_HAS_FDATASYNC 0
5252
#endif
5353

54+
/*
55+
* For NuttX, CONFIG_HAS_ISATTY is provided by its platform header.
56+
* (platform_internal.h)
57+
*/
58+
#ifndef __NuttX__
5459
#ifndef __CloudABI__
5560
#define CONFIG_HAS_ISATTY 1
5661
#else
5762
#define CONFIG_HAS_ISATTY 0
5863
#endif
64+
#endif
5965

6066
#ifndef __APPLE__
6167
#define CONFIG_HAS_POSIX_FALLOCATE 1

0 commit comments

Comments
 (0)