xref: /aosp_15_r20/external/musl/src/unistd/renameat.c (revision c9945492fdd68bbe62686c5b452b4dc1be3f8453)
1*c9945492SAndroid Build Coastguard Worker #include <stdio.h>
2*c9945492SAndroid Build Coastguard Worker #include "syscall.h"
3*c9945492SAndroid Build Coastguard Worker 
renameat(int oldfd,const char * old,int newfd,const char * new)4*c9945492SAndroid Build Coastguard Worker int renameat(int oldfd, const char *old, int newfd, const char *new)
5*c9945492SAndroid Build Coastguard Worker {
6*c9945492SAndroid Build Coastguard Worker #ifdef SYS_renameat
7*c9945492SAndroid Build Coastguard Worker 	return syscall(SYS_renameat, oldfd, old, newfd, new);
8*c9945492SAndroid Build Coastguard Worker #else
9*c9945492SAndroid Build Coastguard Worker 	return syscall(SYS_renameat2, oldfd, old, newfd, new, 0);
10*c9945492SAndroid Build Coastguard Worker #endif
11*c9945492SAndroid Build Coastguard Worker }
12