Skip to content

Commit f863f1f

Browse files
authored
Fix some defines in libs cmake (dotnet#123576)
1 parent 2dde8af commit f863f1f

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/native/libs/Common/pal_config.h.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,6 @@
145145
#cmakedefine01 HAVE_GETGRGID_R
146146
#cmakedefine01 HAVE_TERMIOS2
147147

148-
#ifndef HOST_WASI
149-
#cmakedefine01 HAVE_GETRUSAGE
150-
#endif
151-
152148
// Mac OS X has stat64, but it is deprecated since plain stat now
153149
// provides the same 64-bit aware struct when targeting OS X > 10.5
154150
// and not passing _DARWIN_NO_64_BIT_INODE.

src/native/libs/System.Native/pal_time.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ int64_t SystemNative_GetBootTimeTicks(void)
114114

115115
double SystemNative_GetCpuUtilization(ProcessCpuInformation* previousCpuInfo)
116116
{
117-
#if defined(HAVE_GETRUSAGE)
117+
#ifndef HOST_WASI
118118
uint64_t kernelTime = 0;
119119
uint64_t userTime = 0;
120120

src/native/libs/configure.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,11 @@ check_symbol_exists(
212212
string.h
213213
HAVE_STRCPY_S)
214214

215+
check_symbol_exists(
216+
strlcpy
217+
string.h
218+
HAVE_STRLCPY)
219+
215220
check_symbol_exists(
216221
strlcat
217222
string.h

0 commit comments

Comments
 (0)