diff options
-rw-r--r-- | main/php_virtual_cwd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/main/php_virtual_cwd.c b/main/php_virtual_cwd.c index 1086fa05d8..974caf567b 100644 --- a/main/php_virtual_cwd.c +++ b/main/php_virtual_cwd.c @@ -72,7 +72,10 @@ typedef struct _cwd_state { uint cwd_length; } cwd_state; -#ifndef PHP_WIN32 +#ifndef S_ISDIR +#define S_ISDIR(mode) ((mode) & _S_IFDIR) +#endif + static int php_is_dir_ok(const cwd_state *state) { struct stat buf; @@ -82,7 +85,7 @@ static int php_is_dir_ok(const cwd_state *state) return (1); } -#endif + char *virtual_getcwd(cwd_state *state, uint *length) |