diff options
author | foobar <sniper@php.net> | 2006-04-10 11:56:18 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2006-04-10 11:56:18 +0000 |
commit | 22a8c3113bbd6e4d7015f1bffc8be5d091789566 (patch) | |
tree | a79e1297f81662862830a1147d2c9014f0b210d5 | |
parent | 8cd558757fc54da0bc998d1b1142954fd265c695 (diff) | |
download | php-git-22a8c3113bbd6e4d7015f1bffc8be5d091789566.tar.gz |
MFH: - Fixed bug #36909 (ld: Undefined symbols: _lchown)
-rw-r--r-- | TSRM/tsrm_virtual_cwd.h | 4 | ||||
-rw-r--r-- | ext/standard/filestat.c | 4 |
2 files changed, 8 insertions, 0 deletions
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 93945e00b4..845b1c574d 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -358,7 +358,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); } @@ -432,7 +434,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); } |