diff options
| author | Nicholas Rodrigues Lordello <[email protected]> | 2026-10-10 20:25:21 +0200 |
|---|---|---|
| committer | Nicholas Rodrigues Lordello <[email protected]> | 2026-10-10 20:25:21 +0200 |
| commit | bfcf30e800c68e0289f17b3967081280fca6592c (patch) | |
| tree | 96e29101ab4cd85d144744307e82ae436e87726a /lib | |
| parent | 70d2db07ec4dd5034c6d888258a3fd945c67e4d4 (diff) | |
Fixed Minor Portability Issues
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/wamr/custom/platform.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/lib/wamr/custom/platform.c b/lib/wamr/custom/platform.c index 387a040..eccd975 100644 --- a/lib/wamr/custom/platform.c +++ b/lib/wamr/custom/platform.c @@ -1,14 +1,17 @@ -#include "bh_assert.h" -#include "platform_api_extension.h" -#include "platform_api_vmcore.h" -#include "platform_internal.h" +#include "../core/config.h" -#ifdef BH_DEBUG +#if BH_DEBUG != 0 +#define _POSIX_C_SOURCE 200809L #include <execinfo.h> #include <time.h> #endif -#ifdef BH_DEBUG +#include "bh_assert.h" +#include "platform_api_extension.h" +#include "platform_api_vmcore.h" +#include "platform_internal.h" + +#if BH_DEBUG != 0 #define NOT_IMPLEMENTED() \ do { \ fprintf(stderr, "'%s' is not implemented\n", __FUNCTION__); \ @@ -43,15 +46,15 @@ int os_printf(const char *format, ...) { } int os_vprintf(const char *format, va_list ap) { -#ifdef BH_DEBUG +#if BH_DEBUG != 0 return vprintf(format, ap); #else - return 0 + return 0; #endif } uint64_t os_time_get_boot_us(void) { -#ifdef BH_DEBUG +#if BH_DEBUG != 0 struct timespec ts; if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0) { return 0; |
