|
From: <sv...@va...> - 2012-08-18 06:45:21
|
sewardj 2012-08-18 07:45:07 +0100 (Sat, 18 Aug 2012)
New Revision: 12878
Log:
On Darwin, use __NR_poll_nocancel rather than __NR_poll, as per the
comment at the top of the file.
Modified files:
trunk/coregrind/m_libcfile.c
Modified: trunk/coregrind/m_libcfile.c (+7 -1)
===================================================================
--- trunk/coregrind/m_libcfile.c 2012-08-18 03:44:49 +01:00 (rev 12877)
+++ trunk/coregrind/m_libcfile.c 2012-08-18 07:45:07 +01:00 (rev 12878)
@@ -456,10 +456,16 @@
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);
}
|