From 0cf82575ebc236b8248271b16b2bfc9b3e26d435 Mon Sep 17 00:00:00 2001 From: vsfos Date: Wed, 2 Aug 2023 17:36:10 +0800 Subject: [PATCH] [shell/linux] avoid to remap snprintf/vsnprintf for wasm --- source/shell/sys/linux/include/simple_libc/stdio.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/shell/sys/linux/include/simple_libc/stdio.h b/source/shell/sys/linux/include/simple_libc/stdio.h index f59a09725..e7c57d488 100644 --- a/source/shell/sys/linux/include/simple_libc/stdio.h +++ b/source/shell/sys/linux/include/simple_libc/stdio.h @@ -84,8 +84,10 @@ extern "C" { #define tmpfile VSF_LINUX_LIBC_WRAPPER(tmpfile) #define tmpnam VSF_LINUX_LIBC_WRAPPER(tmpnam) -#define vsnprintf VSF_LINUX_LIBC_WRAPPER(vsnprintf) -#define snprintf VSF_LINUX_LIBC_WRAPPER(snprintf) +#ifndef __CPU_WEBASSEMBLY__ +# define vsnprintf VSF_LINUX_LIBC_WRAPPER(vsnprintf) +# define snprintf VSF_LINUX_LIBC_WRAPPER(snprintf) +#endif #if defined(_GNU_SOURCE) #define getline VSF_LINUX_LIBC_WRAPPER(getline)