Signed-off-by: Jonas Bonn <[email protected]>
---
 libc/sysdeps/linux/common/symlink.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/libc/sysdeps/linux/common/symlink.c 
b/libc/sysdeps/linux/common/symlink.c
index e53e8d4..ff89848 100644
--- a/libc/sysdeps/linux/common/symlink.c
+++ b/libc/sysdeps/linux/common/symlink.c
@@ -7,8 +7,20 @@
  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  */
 
+#include <fcntl.h>
 #include <sys/syscall.h>
-#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K
 #include <unistd.h>
+
+#ifdef __NR_symlinkat
+int symlink(const char* oldpath, const char* newpath)
+{
+       return symlinkat(oldpath, AT_FDCWD, newpath);
+}
+
+#else
+
+#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K
 _syscall2(int, symlink, const char *, oldpath, const char *, newpath)
 #endif
+
+#endif
-- 
1.7.5.4

_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to