Commit 48591e2a259d84247ae38f050bd58e6f7450bb77 forgot to update utime.c
resulting in the following riscv32 build failure with applications using
utime such as bzip2:
/home/buildroot/autobuild/instance-0/output-1/host/riscv32-buildroot-linux-uclibc/bin/ld.real:
bzip2.o: in function `copyFileName':
bzip2.c:(.text+0x1fcc): undefined reference to `utime'
Fixes: 48591e2a259d84247ae38f050bd58e6f7450bb77
-
http://autobuild.buildroot.org/results/2e37d4e0bcef515fe9e643737419bfd26aa2…
Signed-off-by: Fabrice Fontaine <fontaine.fabrice(a)gmail.com>
---
libc/sysdeps/linux/common/utime.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libc/sysdeps/linux/common/utime.c b/libc/sysdeps/linux/common/utime.c
index e4ac0b269..c716388e8 100644
--- a/libc/sysdeps/linux/common/utime.c
+++ b/libc/sysdeps/linux/common/utime.c
@@ -9,7 +9,7 @@
#include <sys/syscall.h>
#include <utime.h>
-#if defined __NR_utimensat && !defined __NR_utime
+#if (defined(__NR_utimensat) || defined(__NR_utimensat_time64)) && !defined
__NR_utime
# include <fcntl.h>
# include <stddef.h>
@@ -51,7 +51,7 @@ int utime(const char *file, const struct utimbuf *times)
}
#endif
-#if (defined __NR_utimensat && !defined __NR_utime) || \
+#if ((defined(__NR_utimensat) || defined(__NR_utimensat_time64)) && !defined
__NR_utime) || \
defined __NR_utime || defined __NR_utimes
libc_hidden_def(utime)
#endif
--
2.43.0