]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
On Darwin, use __NR_poll_nocancel rather than __NR_poll, as per the
authorJulian Seward <jseward@acm.org>
Sat, 18 Aug 2012 06:45:07 +0000 (06:45 +0000)
committerJulian Seward <jseward@acm.org>
Sat, 18 Aug 2012 06:45:07 +0000 (06:45 +0000)
comment at the top of the file.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12878

coregrind/m_libcfile.c

index 252136626eb09e1780edcd18ffe258d5d38bb990..51e8de848a6280e85862eed3e43a69fdb1a9e5b3 100644 (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);
 }