From ca9049c9dbfdb260e3ca0ce27a09de770f3b679b Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sun, 19 May 2024 12:38:44 +0200 Subject: 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 --- 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 #include -#if defined __NR_utimensat && !defined __NR_utime +#if (defined(__NR_utimensat) || defined(__NR_utimensat_time64)) && !defined __NR_utime # include # include @@ -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 -- cgit v1.2.3