From: Markos Chandras <[email protected]>
Signed-off-by: Markos Chandras <[email protected]>
---
libc/sysdeps/linux/common/mkdir.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/libc/sysdeps/linux/common/mkdir.c
b/libc/sysdeps/linux/common/mkdir.c
index fbc587d..b7f025d 100644
--- a/libc/sysdeps/linux/common/mkdir.c
+++ b/libc/sysdeps/linux/common/mkdir.c
@@ -9,8 +9,15 @@
#include <sys/syscall.h>
#include <sys/stat.h>
+#include <fcntl.h>
+#if defined(__NR_mkdirat) && ! defined(__NR_mkdir)
+int mkdir(const char* pathname, mode_t mode)
+{
+ return mkdirat(AT_FDCWD, pathname, mode);
+}
+#else
#define __NR___syscall_mkdir __NR_mkdir
static __inline__ _syscall2(int, __syscall_mkdir, const char *, pathname,
__kernel_mode_t, mode)
@@ -19,4 +26,5 @@ int mkdir(const char *pathname, mode_t mode)
{
return (__syscall_mkdir(pathname, mode));
}
+#endif
libc_hidden_def(mkdir)
--
1.7.1
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc