diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-03-20 17:21:35 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-03-20 17:21:35 +0000 |
commit | 300b8b7f932b78c6fdef1591ba7b5bbd472ac2f2 (patch) | |
tree | 2d43231d952339377552ad828af2cb59dbf1e15c | |
parent | f94a44c3ad06ae6bab203a3dda314b9ed98785e0 (diff) | |
download | buildroot-novena-300b8b7f932b78c6fdef1591ba7b5bbd472ac2f2.tar.gz buildroot-novena-300b8b7f932b78c6fdef1591ba7b5bbd472ac2f2.zip |
- make it work with MacOSX. Closes #1252
-rw-r--r-- | target/makedevs/makedevs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/target/makedevs/makedevs.c b/target/makedevs/makedevs.c index 8f4b192d1..8fa3048c4 100644 --- a/target/makedevs/makedevs.c +++ b/target/makedevs/makedevs.c @@ -31,8 +31,9 @@ #include <stdarg.h> #include <sys/stat.h> #include <sys/types.h> +#ifndef __APPLE__ #include <sys/sysmacros.h> /* major() and minor() */ - +#endif const char *bb_applet_name; @@ -146,7 +147,7 @@ int bb_make_directory (char *path, long mode, int flags) if (mkdir(path, 0777) < 0) { /* If we failed for any other reason than the directory * already exists, output a diagnostic and return -1.*/ - if (errno != EEXIST + if ((errno != EEXIST && errno != EISDIR) || !(flags & FILEUTILS_RECUR) || (stat(path, &st) < 0 || !S_ISDIR(st.st_mode))) { fail_msg = "create"; |