On Darwin, use __NR_poll_nocancel rather than __NR_poll, as per the

comment at the top of the file.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12878
This commit is contained in:
Julian Seward 2012-08-18 06:45:07 +00:00
parent 18a9544be9
commit e81fb2f3e4

View File

@ -456,10 +456,16 @@ Bool VG_(get_startup_wd) ( Char* buf, SizeT size )
return True;
}
Int VG_(poll) (struct vki_pollfd *fds, Int nfds, Int timeout)
Int VG_(poll) (struct vki_pollfd *fds, Int nfds, Int timeout)
{
SysRes res;
# if defined(VGO_linux)
res = VG_(do_syscall3)(__NR_poll, (UWord)fds, nfds, timeout);
# elif defined(VGO_darwin)
res = VG_(do_syscall3)(__NR_poll_nocancel, (UWord)fds, nfds, timeout);
# else
# error "Unknown OS"
# endif
return sr_isError(res) ? -1 : sr_Res(res);
}