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

diff --git a/libc/sysdeps/linux/common/link.c b/libc/sysdeps/linux/common/link.c
index b5e5536..e805949 100644
--- a/libc/sysdeps/linux/common/link.c
+++ b/libc/sysdeps/linux/common/link.c
@@ -9,4 +9,14 @@
 
 #include <sys/syscall.h>
 #include <unistd.h>
+#include <fcntl.h>
+
+#ifdef __NR_linkat
+int link(const char* oldpath, const char* newpath)
+{
+       return linkat(AT_FDCWD, oldpath, AT_FDCWD, newpath, 0);
+}
+
+#elif defined __NR_link
 _syscall2(int, link, const char *, oldpath, const char *, newpath)
+#endif
-- 
1.7.5.4

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

Reply via email to