wasix-org / wasix-libc

wasix libc implementation for WebAssembly
https://wasi.dev
Other
114 stars 19 forks source link

clock_nanosleep: Use timespec_to_timestamp_exact instead #36

Closed daichifukui closed 6 months ago

daichifukui commented 6 months ago

commit ffba88fb5737f37202ea53e4dac593f096166765 is applied for curl to work. However, that commit affects clock_nanosleep in the way as reported in #26. timespec_to_timestamp_clamp allows immediate return as *timestamp = 1 shows, resulting in the issue, but timespec_to_timestamp_exact does not allow such a behaviour. Hence we use timespec_to_timestamp_exact for this fix.

Closes: #26

theduke commented 6 months ago

@daichifukui thanks, we will review shortly!

maminrayej commented 6 months ago

I've tested curl with this patch and it seems to work. The only issue is that I needed to disable socket pairs for it to work which I believe is an issue unrelated to this PR.