musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorTony Ambardar <tony.ambardar@gmail.com>2024年05月06日 20:28:32 -0700
committerRich Felker <dalias@aerifal.cx>2024年05月23日 09:13:49 -0400
commit05ce67fea99ca09cd4b6625cff7aec9cc222dd5a (patch)
tree2cdba37f1d75c63e307feab1d067a809884370f2 /include
parent007997299248b8682dcbb73595c53dfe86071c83 (diff)
downloadmusl-05ce67fea99ca09cd4b6625cff7aec9cc222dd5a.tar.gz
add renameat2 linux syscall wrapper
This syscall is available since Linux 3.15 and also implemented in glibc from version 2.28. It is commonly used in filesystem or security contexts. Constants RENAME_NOREPLACE, RENAME_EXCHANGE, RENAME_WHITEOUT are guarded by _GNU_SOURCE as with glibc.
Diffstat (limited to 'include')
-rw-r--r--include/stdio.h 7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/stdio.h b/include/stdio.h
index cb858618..4ea4c170 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -158,6 +158,13 @@ char *ctermid(char *);
#define L_ctermid 20
#endif
+#if defined(_GNU_SOURCE)
+#define RENAME_NOREPLACE (1 << 0)
+#define RENAME_EXCHANGE (1 << 1)
+#define RENAME_WHITEOUT (1 << 2)
+
+int renameat2(int, const char *, int, const char *, unsigned);
+#endif
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
|| defined(_BSD_SOURCE)
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月04日 18:03:40 +0000

AltStyle によって変換されたページ (->オリジナル) /