Signed-off-by: Jonas Bonn <[email protected]>
---
libc/sysdeps/linux/common/open.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/libc/sysdeps/linux/common/open.c b/libc/sysdeps/linux/common/open.c
index 9fb694d..c94b0d1 100644
--- a/libc/sysdeps/linux/common/open.c
+++ b/libc/sysdeps/linux/common/open.c
@@ -14,9 +14,11 @@
#include <string.h>
#include <sys/param.h>
+#if ! defined __NR_openat
#define __NR___syscall_open __NR_open
static __inline__ _syscall3(int, __syscall_open, const char *, file,
int, flags, __kernel_mode_t, mode)
+#endif
int open(const char *file, int oflag, ...)
{
@@ -29,8 +31,13 @@ int open(const char *file, int oflag, ...)
va_end(arg);
}
+#ifdef __NR_openat
+ return openat(AT_FDCWD, file, oflag, mode);
+#else
return __syscall_open(file, oflag, mode);
+#endif
}
+
#ifndef __LINUXTHREADS_OLD__
libc_hidden_def(open)
#else
--
1.7.5.4
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc