SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
16
multimedia/minidlna/patches/patch-utils_c
Normal file
16
multimedia/minidlna/patches/patch-utils_c
Normal file
|
@ -0,0 +1,16 @@
|
|||
avoid mkdir /, from freebsd ports
|
||||
|
||||
Index: utils.c
|
||||
--- utils.c.orig
|
||||
+++ utils.c
|
||||
@@ -287,7 +287,9 @@ make_dir(char * path, mode_t mode)
|
||||
++s;
|
||||
}
|
||||
|
||||
- if (mkdir(path, mode) < 0) {
|
||||
+ if (!(path[0] == '/' && s == path + 1) /* skip "/" */
|
||||
+ && mkdir(path, mode) < 0) {
|
||||
+ int e = errno;
|
||||
/* If we failed for any other reason than the directory
|
||||
* already exists, output a diagnostic and return -1.*/
|
||||
if ((errno != EEXIST && errno != EISDIR)
|
Loading…
Add table
Add a link
Reference in a new issue