]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
VG_(getdents64) is only needed on Linux, and causes build problems
authorJulian Seward <jseward@acm.org>
Mon, 1 Sep 2014 22:26:18 +0000 (22:26 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 1 Sep 2014 22:26:18 +0000 (22:26 +0000)
on Darwin, so make it exist only on Linux.

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

coregrind/m_libcfile.c
include/pub_tool_libcfile.h

index a019dd845a663a962d27d2d3ea0b5b3893d298d1..be3240b22a01134a5342af542c348ed9b79e5e7b 100644 (file)
@@ -522,19 +522,15 @@ Int VG_(readlink) (const HChar* path, HChar* buf, UInt bufsiz)
    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. */
index e93e6655a8517f1f43057853daf523e62a531223..ea50289b2de04413e445eb89846fef11b2a1ae77 100644 (file)
@@ -92,7 +92,10 @@ extern Int    VG_(unlink) ( const HChar* file_name );
 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 );