From: jim winstead Date: Mon, 6 May 2002 17:31:22 +0000 (+0000) Subject: fix problem with mkdir() on freebsd X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~212 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=51e2ea5ed2959052080f848eb71f74f06070fc57;p=php fix problem with mkdir() on freebsd --- diff --git a/ext/standard/file.c b/ext/standard/file.c index 4c42dd985e..702fdcb8c7 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -1496,7 +1496,7 @@ PHPAPI 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) { @@ -1511,7 +1511,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;