]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
musl: drop renameat2() wrapper
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 20 May 2026 16:08:24 +0000 (01:08 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 20 May 2026 20:06:35 +0000 (05:06 +0900)
musl provides renameat2() since v1.2.6:
https://git.musl-libc.org/cgit/musl/commit/?id=05ce67fea99ca09cd4b6625cff7aec9cc222dd5a

src/include/musl/stdio.h
src/libc/musl/stdio.c

index 54ad9ed110432bca32b5e90ec5fe5f82949272d9..d6a3b54027a3d0b8c6a3cc43d22a99132a1aeee2 100644 (file)
@@ -3,15 +3,6 @@
 
 #include_next <stdio.h>
 
-#ifndef RENAME_NOREPLACE
-#  define RENAME_NOREPLACE (1 << 0)
-#  define RENAME_EXCHANGE  (1 << 1)
-#  define RENAME_WHITEOUT  (1 << 2)
-#endif
-
-int renameat2_shim(int __oldfd, const char *__old, int __newfd, const char *__new, unsigned __flags);
-#define renameat2 renameat2_shim
-
 /* When a stream is opened read-only under glibc, fputs() and friends fail with EBADF. However, they
  * succeed under musl. We rely on the glibc behavior in the code base. The following _check_writable()
  * functions first check if the passed stream is writable, and refuse to write with EBADF if not. */
index f4e8d9e4c18e7245a72f759fe17bd66623e031ab..cfe35b09f9908f9caa59ccfded7cfbe07086a4a2 100644 (file)
@@ -4,15 +4,6 @@
 #include <stdio.h>
 #include <stdio_ext.h>
 
-#include "../libc-shim.h"
-
-DEFINE_SYSCALL_SHIM(renameat2, int,
-                    int, __oldfd,
-                    const char *, __old,
-                    int, __newfd,
-                    const char *, __new,
-                    unsigned, __flags)
-
 #define DEFINE_PUT(func)                                         \
         int func##_check_writable(int c, FILE *stream) {         \
                 if (!__fwritable(stream)) {                      \