ntfsusermap.c: provide mode with mkdir
The desired mkdir does not seem to exist on Cygwin. Fixes compiler error: ntfsusermap.c: In function ‘outputmap’: ntfsusermap.c:817:25: error: too few arguments to function ‘mkdir’ 817 | mkdir(fullname); | ^~~~~ In file included from /usr/include/sys/_default_fcntl.h:212, from /usr/include/sys/fcntl.h:3, from /usr/include/fcntl.h:13, from ntfsusermap.c:113: /usr/include/sys/stat.h:140:9: note: declared here 140 | int mkdir (const char *_path, mode_t __mode ); | ^~~~~pull/106/head
parent
9e0b9ec23a
commit
69c2377280
|
@ -814,7 +814,12 @@ static boolean outputmap(const char *volume, const char *dir)
|
|||
/* build directory, if not present */
|
||||
if (stat(fullname,&st) && (errno == ENOENT)) {
|
||||
printf("* Creating directory %s\n", fullname);
|
||||
#ifdef __CYGWIN__
|
||||
// The one-argument mkdir is exclusive to msvcrt.dll.
|
||||
mkdir(fullname, 777);
|
||||
#else
|
||||
mkdir(fullname);
|
||||
#endif
|
||||
}
|
||||
|
||||
strcat(fullname, DIRSEP);
|
||||
|
|
Loading…
Reference in New Issue