3 --- python3/Modules/posixmodule.c
4 +++ python3/Modules/posixmodule.c
5 @@ -4565,12 +4565,12 @@
9 -#if defined(HAVE_FUTIMESAT) || defined(HAVE_UTIMENSAT)
10 +#if defined(HAVE_FUTIMESAT)
13 utime_dir_fd(utime_t *ut, int dir_fd, char *path, int follow_symlinks)
15 -#ifdef HAVE_UTIMENSAT
17 int flags = follow_symlinks ? 0 : AT_SYMLINK_NOFOLLOW;
19 return utimensat(dir_fd, path, time, flags);
20 @@ -4591,12 +4591,12 @@
21 #define FUTIMENSAT_DIR_FD_CONVERTER dir_fd_unavailable
24 -#if defined(HAVE_FUTIMES) || defined(HAVE_FUTIMENS)
25 +#if defined(HAVE_FUTIMES)
28 utime_fd(utime_t *ut, int fd)
33 return futimens(fd, time);
37 utime_nofollow_symlinks(utime_t *ut, char *path)
39 -#ifdef HAVE_UTIMENSAT
42 return utimensat(DEFAULT_DIR_FD, path, time, AT_SYMLINK_NOFOLLOW);
46 utime_default(utime_t *ut, char *path)
48 -#ifdef HAVE_UTIMENSAT
51 return utimensat(DEFAULT_DIR_FD, path, time, 0);
52 #elif defined(HAVE_UTIMES)
57 -#if defined(HAVE_FUTIMESAT) || defined(HAVE_UTIMENSAT)
58 +#if defined(HAVE_FUTIMESAT)
59 if ((dir_fd != DEFAULT_DIR_FD) || (!follow_symlinks))
60 result = utime_dir_fd(&utime, dir_fd, path->narrow, follow_symlinks);