clang rejects the code where function body is placed
inside body of another function

Signed-off-by: Dmitry Chestnykh <dm.chestn...@gmail.com>
---
 libc/sysdeps/linux/common/rename.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libc/sysdeps/linux/common/rename.c 
b/libc/sysdeps/linux/common/rename.c
index 613ae4e44..821467e3c 100644
--- a/libc/sysdeps/linux/common/rename.c
+++ b/libc/sysdeps/linux/common/rename.c
@@ -18,10 +18,12 @@ int rename(const char *oldpath, const char *newpath)
 }
 #elif defined __NR_renameat2
 # include <fcntl.h>
+
+_syscall5(int, renameat2, int, olddfd, const char *, oldpath,
+               int, newdfd, const char *, newpath, int, flags)
+
 int rename(const char *oldpath, const char *newpath)
 {
-       _syscall5(int, renameat2, int, olddfd, const char *, oldpath,
-                 int, newdfd, const char *, newpath, int, flags)
        return renameat2(AT_FDCWD, oldpath, AT_FDCWD, newpath, 0);
 }
 #else
-- 
2.46.0

_______________________________________________
devel mailing list -- devel@uclibc-ng.org
To unsubscribe send an email to devel-le...@uclibc-ng.org

Reply via email to