mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
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.
This commit is contained in:
@ -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
|
/* Use fstatat because fstat does not work on O_PATH descriptors
|
||||||
before Linux 3.6. */
|
before Linux 3.6. */
|
||||||
struct stat64 st;
|
struct stat64 st;
|
||||||
if (fstatat64 (pathfd, "", &st, AT_EMPTY_PATH) != 0)
|
if (__fstatat64 (pathfd, "", &st, AT_EMPTY_PATH) != 0)
|
||||||
{
|
{
|
||||||
__close_nocancel (pathfd);
|
__close_nocancel (pathfd);
|
||||||
return -1;
|
return -1;
|
||||||
|
Reference in New Issue
Block a user