Index: libc/arch-nacl/syscalls/mkdir.c |
diff --git a/libc/arch-nacl/syscalls/mkdir.c b/libc/arch-nacl/syscalls/mkdir.c |
index 1946f6f3eeb827ca40d08dd4bfb24483be1b18e7..597c47300049687dbcf31672d725b16bbca938b1 100644 |
--- a/libc/arch-nacl/syscalls/mkdir.c |
+++ b/libc/arch-nacl/syscalls/mkdir.c |
@@ -6,11 +6,16 @@ |
#include <sys/stat.h> |
int mkdir(const char *pathname, mode_t mode) { |
- size_t nwrite; |
- int result = nacl_irt_mkdir(pathname, mode); |
- if (result != 0) { |
- errno = result; |
- return -1; |
+ if (__nacl_irt_mkdir) { |
+ size_t nwrite; |
+ int result = __nacl_irt_mkdir(pathname, mode); |
+ if (result != 0) { |
+ errno = result; |
+ return -1; |
+ } |
+ return 0; |
} |
+ errno = ENOSYS; |
+ return -1; |
} |