Skip to content

Commit 8878bf3

Browse files
authored
Add || TARGET_OS_WASI to ifdef in uuid.c (swiftlang#3027)
This makes `nanotime` implementation available for Wasm/WASI.
1 parent 3211ef0 commit 8878bf3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/UUID/uuid.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ static inline void nanotime(struct timespec *tv) {
6161
tv->tv_nsec = now - (tv->tv_sec * 1000000000);
6262
}
6363

64-
#elif TARGET_OS_LINUX || TARGET_OS_BSD
64+
#elif TARGET_OS_LINUX || TARGET_OS_BSD || TARGET_OS_WASI
6565
#include <time.h>
6666

6767
static inline void nanotime(struct timespec *tv) {

0 commit comments

Comments
 (0)