OSDN Git Service

LT.old: Make __errno_location/__h_errno_location thread safe
[uclinux-h8/uClibc.git] / libc / sysdeps / linux / common / rmdir.c
index bad6654..d534b40 100644 (file)
 #include <unistd.h>
 
 
+#if defined __NR_unlinkat && !defined __NR_rmdir
+# include <fcntl.h>
+int rmdir(const char *pathname)
+{
+       return unlinkat(AT_FDCWD, pathname, AT_REMOVEDIR);
+}
+#else
 _syscall1(int, rmdir, const char *, pathname)
+#endif
 libc_hidden_def(rmdir)