Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the correct offset of timeval.tv_usec in select syscall (#20824)
select(2) is declared to accept "struct timeval { time_t tv_sec; suseconds_t tv_usec; }". However, musl passes the two values to the syscall as an array of long values. Note that sizeof(time_t) != sizeof(long) in wasm32. The former is 8, while the latter is 4. This means using "C_STRUCTS.timeval.tv_usec" leads to a wrong offset. So, we should use POINTER_SIZE.