From fd8215d29d66178246efe1eccc38695962185f9d Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 22 May 2021 11:56:52 +0200 Subject: [PATCH] wasi-libc exposes getpid() but it doesn't work without emulation --- configure.ac | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f280c414..c585b616 100644 --- a/configure.ac +++ b/configure.ac @@ -859,7 +859,13 @@ if (&getentropy != NULL) { [AC_MSG_RESULT(no) ]) ]) -AC_CHECK_FUNCS([posix_memalign getpid nanosleep]) + +AS_IF([test "x$WASI" = "x"],[ + AC_CHECK_FUNCS([getpid]) + AC_CHECK_FUNCS([getauxva elf_aux_info]) +]) + +AC_CHECK_FUNCS([posix_memalign nanosleep]) AC_CHECK_FUNCS([memset_s explicit_bzero explicit_memset]) AC_SUBST([LIBTOOL_EXTRA_FLAGS])