diff --git a/src/native/libs/Common/pal_config.h.in b/src/native/libs/Common/pal_config.h.in index 32176492bf488c..579d1ea388e02c 100644 --- a/src/native/libs/Common/pal_config.h.in +++ b/src/native/libs/Common/pal_config.h.in @@ -146,10 +146,6 @@ #cmakedefine01 HAVE_GETGRGID_R #cmakedefine01 HAVE_TERMIOS2 -#ifndef HOST_WASI -#cmakedefine01 HAVE_GETRUSAGE -#endif - // Mac OS X has stat64, but it is deprecated since plain stat now // provides the same 64-bit aware struct when targeting OS X > 10.5 // and not passing _DARWIN_NO_64_BIT_INODE. diff --git a/src/native/libs/System.Native/pal_time.c b/src/native/libs/System.Native/pal_time.c index 0f37ddbe006418..0f2e8cd3dfc23b 100644 --- a/src/native/libs/System.Native/pal_time.c +++ b/src/native/libs/System.Native/pal_time.c @@ -114,7 +114,7 @@ int64_t SystemNative_GetBootTimeTicks(void) double SystemNative_GetCpuUtilization(ProcessCpuInformation* previousCpuInfo) { -#if defined(HAVE_GETRUSAGE) +#ifndef HOST_WASI uint64_t kernelTime = 0; uint64_t userTime = 0; diff --git a/src/native/libs/configure.cmake b/src/native/libs/configure.cmake index 42821749e8f6f5..dcabb1e346552c 100644 --- a/src/native/libs/configure.cmake +++ b/src/native/libs/configure.cmake @@ -208,6 +208,11 @@ check_symbol_exists( string.h HAVE_STRCPY_S) +check_symbol_exists( + strlcpy + string.h + HAVE_STRLCPY) + check_symbol_exists( strlcat string.h