summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
authorFabrice Fontaine <fontaine.fabrice@gmail.com>2024-05-19 12:38:44 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2024-05-20 10:07:15 +0200
commitca9049c9dbfdb260e3ca0ce27a09de770f3b679b (patch)
tree44d233029d289b4abdf9e6bf4e58375d1eb6754f /libc/sysdeps/linux
parent24e6de08d5888ea9e8d53d471d61bc1886dce8fc (diff)
libc/sysdeps/linux/common/utime.c: fix riscv32 build
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/2e37d4e0bcef515fe9e643737419bfd26aa2833e Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/common/utime.c4
1 files 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