summaryrefslogtreecommitdiffstats
path: root/usr/klibc/symlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/klibc/symlink.c')
-rw-r--r--usr/klibc/symlink.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/usr/klibc/symlink.c b/usr/klibc/symlink.c
new file mode 100644
index 0000000..080394f
--- /dev/null
+++ b/usr/klibc/symlink.c
@@ -0,0 +1,12 @@
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/syscall.h>
+
+#ifndef __NR_symlink
+
+int symlink(const char *oldpath, const char *newpath)
+{
+ return symlinkat(oldpath, AT_FDCWD, newpath);
+}
+
+#endif /* __NR_symlink */