#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. */
#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)) { \