summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/unistd/symlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/unistd/symlink.c')
-rw-r--r--libc-top-half/musl/src/unistd/symlink.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/unistd/symlink.c b/libc-top-half/musl/src/unistd/symlink.c
new file mode 100644
index 0000000..0973d78
--- /dev/null
+++ b/libc-top-half/musl/src/unistd/symlink.c
@@ -0,0 +1,12 @@
+#include <unistd.h>
+#include <fcntl.h>
+#include "syscall.h"
+
+int symlink(const char *existing, const char *new)
+{
+#ifdef SYS_symlink
+ return syscall(SYS_symlink, existing, new);
+#else
+ return syscall(SYS_symlinkat, existing, AT_FDCWD, new);
+#endif
+}