Browse Source

utimes: force to use 64-bit implementation if available and requested (part II)

- fix dependency for libc_hidden_def(utimes) statement, fixes (on ARM-64bit):

  ./include/libc-symbols.h:431:32: error: '__EI_utimes' aliased to undefined symbol '__GI_utimes'
    431 |         extern __typeof (name) __EI_##name __attribute__((alias (__hidden_asmname1 (,#local)))) \
        |                                ^~~~~
  ./include/libc-symbols.h:435:41: note: in expansion of macro '__hidden_ver1'
    435 | #  define hidden_def(name)              __hidden_ver1(__GI_##name, name, name);
        |                                         ^~~~~~~~~~~~~
  ./include/libc-symbols.h:503:32: note: in expansion of macro 'hidden_def'
    503 | # define libc_hidden_def(name) hidden_def (name)
        |                                ^~~~~~~~~~
  libc/sysdeps/linux/common/utimes.c:54:1: note: in expansion of macro 'libc_hidden_def'
     54 | libc_hidden_def(utimes)
        | ^~~~~~~~~~~~~~~

- fix dependency for 64-bit implementation, fixes (on ARM-64bit):

  .../build/busybox-1.37.0/libbb/copy_file.c:433:(.text.copy_file+0x2b0): undefined reference to `utimes'

Fixes: 48591e2a2 ("Provide fixups for riscv32.")
Fixes: 5aee86ed3 ("utimes: force to use 64-bit implementation if available and requested")
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Peter Seiderer 2 months ago
parent
commit
61b3c079bd
1 changed files with 2 additions and 2 deletions
  1. 2 2
      libc/sysdeps/linux/common/utimes.c

+ 2 - 2
libc/sysdeps/linux/common/utimes.c

@@ -9,7 +9,7 @@
 #include <sys/syscall.h>
 #include <sys/time.h>
 
-#if (defined (__NR_utimensat) || defined(__NR_utimensat_time64)) && defined(__UCLIBC_USE_TIME64__)
+#if (defined (__NR_utimensat) || defined(__NR_utimensat_time64)) && (!defined __NR_utimes || defined(__UCLIBC_USE_TIME64__))
 # include <fcntl.h>
 # include <stddef.h>
 int utimes(const char *file, const struct timeval tvp[2])
@@ -50,6 +50,6 @@ int utimes(const char *file, const struct timeval tvp[2])
 }
 #endif
 
-#if defined __NR_utimensat || defined __NR_utimensat_time64 || defined __NR_utimes || defined __NR_utime
+#if (((defined __NR_utimensat || defined __NR_utimensat_time64) && (!defined __NR_utimes || defined __UCLIBC_USE_TIME64__))) || defined __NR_utimes || defined __NR_utime
 libc_hidden_def(utimes)
 #endif