about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2020-03-05 13:27:53 +0100
committerFlorian Weimer <fweimer@redhat.com>2020-03-05 16:10:26 +0100
commite5244cd88a5414c964b32bb95cf60fc9c1958a5f (patch)
tree55744de42c020d507f875ca08ab3b248e532d618
parentc10826a3277aa7fc0040c0fa18e60cafbab26edf (diff)
downloadglibc-e5244cd88a5414c964b32bb95cf60fc9c1958a5f.tar.gz
glibc-e5244cd88a5414c964b32bb95cf60fc9c1958a5f.tar.xz
glibc-e5244cd88a5414c964b32bb95cf60fc9c1958a5f.zip
Linux: Use __fstatat64 in fchmodat implementation
fstatat64 depends on inlining to produce the desired __fxstatat64
call, which does not happen with -Os, leading to a link failure
with an undefined reference to fstatat64.  __fxstatat64 has a macro
definition in include/sys/stat.h and thus avoids the problem.
-rw-r--r--sysdeps/unix/sysv/linux/fchmodat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/fchmodat.c b/sysdeps/unix/sysv/linux/fchmodat.c
index 17eca54051..5531f1aa6f 100644
--- a/sysdeps/unix/sysv/linux/fchmodat.c
+++ b/sysdeps/unix/sysv/linux/fchmodat.c
@@ -48,7 +48,7 @@ fchmodat (int fd, const char *file, mode_t mode, int flag)
       /* Use fstatat because fstat does not work on O_PATH descriptors
 	 before Linux 3.6.  */
       struct stat64 st;
-      if (fstatat64 (pathfd, "", &st, AT_EMPTY_PATH) != 0)
+      if (__fstatat64 (pathfd, "", &st, AT_EMPTY_PATH) != 0)
 	{
 	  __close_nocancel (pathfd);
 	  return -1;