[hurd,commited 1/3] hurd: Add __fstatat64 to dl-sysdep.c

Samuel Thibault <[email protected]>
Newsgroups gmane.os.hurd.cvs,gmane.comp.lib.glibc.alpha
Message-ID <[email protected]>
Fixes b9957a70b82203d91b0659b93cfe8632f954aba3
("Add system-wide tunables: cache ld.so.cache")
which adds calling it from rtld.
---
 sysdeps/mach/hurd/Versions             |  2 +-
 sysdeps/mach/hurd/dl-sysdep.c          | 11 +++++++++++
 sysdeps/mach/hurd/i386/localplt.data   |  1 +
 sysdeps/mach/hurd/x86_64/localplt.data |  1 +
 4 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/sysdeps/mach/hurd/Versions b/sysdeps/mach/hurd/Versions
index 17592d3569..ce8694fc88 100644
--- a/sysdeps/mach/hurd/Versions
+++ b/sysdeps/mach/hurd/Versions
@@ -62,6 +62,6 @@ ld {
     __read_nocancel; __pread64_nocancel;
     __write_nocancel;
     __getcwd;
-    __stat64; __fstat64;
+    __stat64; __fstat64; __fstatat64;
   }
 }
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index fe6d453756..4d32c04069 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -542,6 +542,17 @@ __stat64 (const char *file, struct stat64 *buf)
 }
 libc_hidden_def (__stat64)
 
+check_no_hidden(__fstatat64);
+int weak_function
+__fstatat64 (int dirfd, const char *pathname, struct stat64 *buf, int flags)
+{
+  assert (dirfd == AT_FDCWD);
+  assert (flags == 0);
+
+  return __stat64 (pathname, buf);
+}
+libc_hidden_def (__fstatat64)
+
 /* This function is called by the dynamic linker (rtld.c) to check for
    existence of /etc/ld.so.preload.  This stub will always fail, which
    means that /etc/ld.so.preload is unsupported.  */
diff --git a/sysdeps/mach/hurd/i386/localplt.data b/sysdeps/mach/hurd/i386/localplt.data
index b7882d0fbd..f0bddf933f 100644
--- a/sysdeps/mach/hurd/i386/localplt.data
+++ b/sysdeps/mach/hurd/i386/localplt.data
@@ -25,6 +25,7 @@ ld.so: __writev
 ld.so: __libc_lseek64
 ld.so: __mmap
 ld.so: __fstat64
+ld.so: __fstatat64
 ld.so: __stat64
 ld.so: __access
 ld.so: __getpid
diff --git a/sysdeps/mach/hurd/x86_64/localplt.data b/sysdeps/mach/hurd/x86_64/localplt.data
index b7689b5cb0..710abff73e 100644
--- a/sysdeps/mach/hurd/x86_64/localplt.data
+++ b/sysdeps/mach/hurd/x86_64/localplt.data
@@ -24,6 +24,7 @@ ld.so: __writev
 ld.so: __libc_lseek64
 ld.so: __mmap
 ld.so: __fstat64
+ld.so: __fstatat64
 ld.so: __stat64
 ld.so: __access
 ld.so: __getpid
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.