From: Markos Chandras <[email protected]>

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

diff --git a/libc/sysdeps/linux/common/link.c b/libc/sysdeps/linux/common/link.c
index b5e5536..9cc197a 100644
--- a/libc/sysdeps/linux/common/link.c
+++ b/libc/sysdeps/linux/common/link.c
@@ -8,5 +8,14 @@
  */
 
 #include <sys/syscall.h>
+#include <fcntl.h>
 #include <unistd.h>
+
+#if defined(__NR_linkat) && ! defined(__NR_link)
+int link(const char* oldpath, const char* newpath)
+{
+       return linkat(AT_FDCWD, oldpath, AT_FDCWD, newpath, 0);
+}
+#else
 _syscall2(int, link, const char *, oldpath, const char *, newpath)
+#endif
-- 
1.7.1


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

Reply via email to