|
From: <sv...@va...> - 2014-09-01 22:26:27
|
Author: sewardj
Date: Mon Sep 1 22:26:18 2014
New Revision: 14421
Log:
VG_(getdents64) is only needed on Linux, and causes build problems
on Darwin, so make it exist only on Linux.
Modified:
trunk/coregrind/m_libcfile.c
trunk/include/pub_tool_libcfile.h
Modified: trunk/coregrind/m_libcfile.c
==============================================================================
--- trunk/coregrind/m_libcfile.c (original)
+++ trunk/coregrind/m_libcfile.c Mon Sep 1 22:26:18 2014
@@ -522,19 +522,15 @@
return sr_isError(res) ? -1 : sr_Res(res);
}
+#if defined(VGO_linux)
Int VG_(getdents64) (Int fd, struct vki_dirent64 *dirp, UInt count)
{
-# if defined(VGO_linux)
SysRes res;
/* res = getdents( fd, dirp, count ); */
res = VG_(do_syscall3)(__NR_getdents64, fd, (UWord)dirp, count);
return sr_isError(res) ? -1 : sr_Res(res);
-# elif defined(VGO_darwin)
- I_die_here;
-# else
-# error "Unknown OS"
-# endif
}
+#endif
/* Check accessibility of a file. Returns zero for access granted,
nonzero otherwise. */
Modified: trunk/include/pub_tool_libcfile.h
==============================================================================
--- trunk/include/pub_tool_libcfile.h (original)
+++ trunk/include/pub_tool_libcfile.h Mon Sep 1 22:26:18 2014
@@ -92,7 +92,10 @@
extern SysRes VG_(poll) (struct vki_pollfd *fds, Int nfds, Int timeout);
extern Int VG_(readlink)( const HChar* path, HChar* buf, UInt bufsize );
+
+#if defined(VGO_linux)
extern Int VG_(getdents64)( Int fd, struct vki_dirent64 *dirp, UInt count );
+#endif
extern const HChar* VG_(basename)( const HChar* path );
extern const HChar* VG_(dirname) ( const HChar* path );
|