diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/poll.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/poll.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/poll.c b/sysdeps/unix/sysv/linux/poll.c index 875c3b48f8..b92139aab4 100644 --- a/sysdeps/unix/sysv/linux/poll.c +++ b/sysdeps/unix/sysv/linux/poll.c @@ -41,10 +41,13 @@ poll (fds, nfds, timeout) { if (syscall) { + int errno_saved = errno; int retval = __syscall_poll (fds, nfds, timeout); if (retval >= 0 || errno != ENOSYS) return retval; + + __set_errno (errno_saved); } must_emulate = 1; |