mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 21:10:07 +00:00
Linux: Use AT_FDCWD in utime, utimes when calling utimensat
0 is a valid descriptor without any special meaning. Reviewed-by: Lukasz Majewski <lukma@denx.de>
This commit is contained in:
parent
1301097665
commit
c10826a327
@ -18,6 +18,7 @@
|
||||
|
||||
#include <utime.h>
|
||||
#include <time.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
int
|
||||
__utime64 (const char *file, const struct __utimbuf64 *times)
|
||||
@ -32,7 +33,7 @@ __utime64 (const char *file, const struct __utimbuf64 *times)
|
||||
ts64[1].tv_nsec = 0LL;
|
||||
}
|
||||
|
||||
return __utimensat64_helper (0, file, times ? ts64 : NULL, 0);
|
||||
return __utimensat64_helper (AT_FDCWD, file, times ? ts64 : NULL, 0);
|
||||
}
|
||||
|
||||
#if __TIMESIZE != 64
|
||||
|
@ -17,6 +17,7 @@
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <time.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
int
|
||||
__utimes64 (const char *file, const struct __timeval64 tvp[2])
|
||||
@ -29,7 +30,7 @@ __utimes64 (const char *file, const struct __timeval64 tvp[2])
|
||||
ts64[1] = timeval64_to_timespec64 (tvp[1]);
|
||||
}
|
||||
|
||||
return __utimensat64_helper (0, file, tvp ? ts64 : NULL, 0);
|
||||
return __utimensat64_helper (AT_FDCWD, file, tvp ? ts64 : NULL, 0);
|
||||
}
|
||||
|
||||
#if __TIMESIZE != 64
|
||||
|
Loading…
Reference in New Issue
Block a user