diff options
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; |
