From: Markos Chandras <[email protected]>
Signed-off-by: Markos Chandras <[email protected]>
---
libc/sysdeps/linux/common/rmdir.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/libc/sysdeps/linux/common/rmdir.c
b/libc/sysdeps/linux/common/rmdir.c
index bad6654..9161819 100644
--- a/libc/sysdeps/linux/common/rmdir.c
+++ b/libc/sysdeps/linux/common/rmdir.c
@@ -8,8 +8,16 @@
*/
#include <sys/syscall.h>
+#include <fcntl.h>
#include <unistd.h>
+#if defined(__NR_unlinkat) && ! defined(__NR_rmdir)
+int rmdir(const char* pathname)
+{
+ return unlinkat(AT_FDCWD, pathname, AT_REMOVEDIR);
+}
+#else
_syscall1(int, rmdir, const char *, pathname)
+#endif
libc_hidden_def(rmdir)
--
1.7.1
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc