From: Julian Seward Date: Sat, 18 Aug 2012 06:45:07 +0000 (+0000) Subject: On Darwin, use __NR_poll_nocancel rather than __NR_poll, as per the X-Git-Tag: svn/VALGRIND_3_9_0~762 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e81fb2f3e4f3ba7f2abaf1c96ea94533a58425eb;p=thirdparty%2Fvalgrind.git 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 --- diff --git a/coregrind/m_libcfile.c b/coregrind/m_libcfile.c index 252136626e..51e8de848a 100644 --- a/coregrind/m_libcfile.c +++ b/coregrind/m_libcfile.c @@ -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); }