replace all remaining internal uses of pthread_self with __pthread_self
[musl] / src / stdio / rename.c
index 4eced08..04c90c0 100644 (file)
@@ -1,7 +1,12 @@
 #include <stdio.h>
+#include <fcntl.h>
 #include "syscall.h"
 
 int rename(const char *old, const char *new)
 {
-       return syscall2(__NR_rename, (long)old, (long)new);
+#ifdef SYS_rename
+       return syscall(SYS_rename, old, new);
+#else
+       return syscall(SYS_renameat, AT_FDCWD, old, AT_FDCWD, new);
+#endif
 }