From: foobar Date: Mon, 10 Apr 2006 11:56:04 +0000 (+0000) Subject: - Fixed bug #36909 (ld: Undefined symbols: _lchown) X-Git-Tag: RELEASE_1_3~111 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a6a3c9059d2d50a66eecd991deb47cb17198c266;p=php - Fixed bug #36909 (ld: Undefined symbols: _lchown) --- diff --git a/TSRM/tsrm_virtual_cwd.h b/TSRM/tsrm_virtual_cwd.h index 5ad435d274..b92f0f2875 100644 --- a/TSRM/tsrm_virtual_cwd.h +++ b/TSRM/tsrm_virtual_cwd.h @@ -243,8 +243,10 @@ extern virtual_cwd_globals cwd_globals; #define VCWD_CHMOD(path, mode) virtual_chmod(path, mode TSRMLS_CC) #if !defined(TSRM_WIN32) && !defined(NETWARE) #define VCWD_CHOWN(path, owner, group) virtual_chown(path, owner, group, 0 TSRMLS_CC) +#if HAVE_LCHOWN #define VCWD_LCHOWN(path, owner, group) virtual_chown(path, owner, group, 1 TSRMLS_CC) #endif +#endif #else @@ -286,8 +288,10 @@ extern virtual_cwd_globals cwd_globals; #define VCWD_CHMOD(path, mode) chmod(path, mode) #if !defined(TSRM_WIN32) && !defined(NETWARE) #define VCWD_CHOWN(path, owner, group) chown(path, owner, group) +#if HAVE_LCHOWN #define VCWD_LCHOWN(path, owner, group) lchown(path, owner, group) #endif +#endif #endif diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index f8de711e32..9a9365f372 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -353,7 +353,9 @@ static void php_do_chgrp(INTERNAL_FUNCTION_PARAMETERS, int do_lchgrp) } if (do_lchgrp) { +#if HAVE_LCHOWN ret = VCWD_LCHOWN(Z_STRVAL_PP(filename), -1, gid); +#endif } else { ret = VCWD_CHOWN(Z_STRVAL_PP(filename), -1, gid); } @@ -423,7 +425,9 @@ static void php_do_chown(INTERNAL_FUNCTION_PARAMETERS, int do_lchown) } if (do_lchown) { +#if HAVE_LCHOWN ret = VCWD_LCHOWN(Z_STRVAL_PP(filename), uid, -1); +#endif } else { ret = VCWD_CHOWN(Z_STRVAL_PP(filename), uid, -1); }