fix fallback checks for kernels without private futex support

for unknown syscall commands, the kernel produces ENOSYS, not EINVAL.
This commit is contained in:
Rich Felker 2014-08-22 23:49:54 -04:00
commit b8ca9eb530
5 changed files with 5 additions and 5 deletions

View file

@ -29,7 +29,7 @@ int __timedwait(volatile int *addr, int val,
pthread_cleanup_push(cleanup, arg);
r = -__syscall_cp(SYS_futex, addr, FUTEX_WAIT|priv, val, top);
if (r == EINVAL) r = -__syscall_cp(SYS_futex, addr, FUTEX_WAIT, val, top);
if (r == ENOSYS) r = -__syscall_cp(SYS_futex, addr, FUTEX_WAIT, val, top);
if (r != EINTR && r != ETIMEDOUT) r = 0;
pthread_cleanup_pop(0);