From: Julian Seward Date: Tue, 19 Aug 2008 08:32:03 +0000 (+0000) Subject: Tidy up VG_(stat) usage in VG_(check_executable). Followup to r8522. X-Git-Tag: svn/VALGRIND_3_4_0~287 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a6645146d2f1c4193064165680504819ba715e0;p=thirdparty%2Fvalgrind.git Tidy up VG_(stat) usage in VG_(check_executable). Followup to r8522. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8523 --- diff --git a/coregrind/m_libcfile.c b/coregrind/m_libcfile.c index 4b080c83bd..05b0cf9f0e 100644 --- a/coregrind/m_libcfile.c +++ b/coregrind/m_libcfile.c @@ -401,17 +401,8 @@ Int VG_(access) ( HChar* path, Bool irusr, Bool iwusr, Bool ixusr ) Int VG_(check_executable)(/*OUT*/Bool* is_setuid, HChar* f, Bool allow_setuid) { - /* This is something of a kludge. Really we should fix VG_(stat) to - do this itself, but not clear how to do it as it depends on - having a 'struct vki_stat64' which is different from 'struct - vki_stat'. */ -# if defined(VGO_linux) && defined(__NR_stat64) - struct vki_stat64 st; - SysRes res = VG_(do_syscall2)(__NR_stat64, (UWord)f, (UWord)&st); -# else - struct vki_stat st; + struct vg_stat st; SysRes res = VG_(stat)(f, &st); -# endif if (is_setuid) *is_setuid = False;