From: Julian Seward Date: Sun, 2 Sep 2012 14:14:12 +0000 (+0000) Subject: Merge from trunk, r12878 X-Git-Tag: svn/VALGRIND_3_8_1~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eeb5a10ac876cf6447d02f71bdf14be44132e14d;p=thirdparty%2Fvalgrind.git Merge from trunk, r12878 (On Darwin, use __NR_poll_nocancel rather than __NR_poll) git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_8_BRANCH@12933 --- 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); }