Skip to content

Avoid having g_futex_simple() inadvertently modify errno

Peter Kjellerstedt requested to merge Saur/glib:pkj/fix-g_futex_simple into main

If both __NR_futex and __NR_futex_time64 are defined, g_futex_simple() will first call futex_time64(). If that fails with ENOSYS, then futex_time() is called instead. However, errno was not saved and restored in this case, which would result in g_futex_simple() returning with errno set to ENOSYS, even if futex_time() succeeded.

Merge request reports