diff --git a/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h index 1b600798c79fc..4397a30319664 100644 --- a/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h +++ b/system/lib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h @@ -869,7 +869,7 @@ struct __sanitizer_pollfd { short revents; }; -# if SANITIZER_ANDROID || SANITIZER_APPLE +# if SANITIZER_ANDROID || SANITIZER_APPLE || SANITIZER_EMSCRIPTEN typedef unsigned __sanitizer_nfds_t; # else typedef unsigned long __sanitizer_nfds_t; diff --git a/system/lib/libc/musl/include/poll.h b/system/lib/libc/musl/include/poll.h index 272dc34a89e50..0cb10863bd155 100644 --- a/system/lib/libc/musl/include/poll.h +++ b/system/lib/libc/musl/include/poll.h @@ -26,7 +26,8 @@ extern "C" { #define POLLRDHUP 0x2000 #endif -typedef unsigned long nfds_t; +// XXX Emscripten: nfds_t is kept 32-bit even on wasm64. +typedef unsigned int nfds_t; struct pollfd { int fd;