Skip to contentSkip to conversation

svn commit: trunk/buildroot/target/makedevs

Buildroot aldot at uclibc.org 1 participant 1 message Mar 20, 2007

lore
Share & tools
lore
#0 lore raw

Author: aldot
Date: 2007-03-20 10:21:35 -0700 (Tue, 20 Mar 2007) New Revision: 18182

Log:
- make it work with MacOSX. Closes #1252

Modified:
trunk/buildroot/target/makedevs/makedevs.c

Changeset:
Modified: trunk/buildroot/target/makedevs/makedevs.c
===================================================================

buildroot/target/makedevs/makedevs.c +3 -2
@@ -31,9 +31,10 @@
 #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;
 
 void bb_verror_msg(const char *s, va_list p)
@@ -146,7 +147,7 @@
 		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";