From: jim winstead Date: Mon, 6 May 2002 17:32:05 +0000 (+0000) Subject: MFH: fix problem with mkdir() on freebsd X-Git-Tag: php-4.2.1RC2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a6faca14b71596b88d898eb5c5be80a6780085b9;p=php MFH: fix problem with mkdir() on freebsd --- diff --git a/ext/standard/file.c b/ext/standard/file.c index 6e918eb5b1..64a2614510 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -1453,7 +1453,7 @@ PHP_FUNCTION(fseek) PHP_FUNCTION(mkdir) { int dir_len, ret; - mode_t mode = 0777; + long mode = 0777; char *dir; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &dir, &dir_len, &mode) == FAILURE) { @@ -1468,7 +1468,7 @@ PHP_FUNCTION(mkdir) RETURN_FALSE; } - ret = VCWD_MKDIR(dir, mode); + ret = VCWD_MKDIR(dir, (mode_t)mode); if (ret < 0) { php_error(E_WARNING, "mkdir() failed (%s)", strerror(errno)); RETURN_FALSE;