diff options
author | Anatol Belski <ab@php.net> | 2014-04-14 23:29:38 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-04-14 23:29:38 +0200 |
commit | 24b72e7a277ad3b9127833c7c61bd5a8f5fee02e (patch) | |
tree | c591c6fd898b15ad18d7d624b07f6838841cb216 | |
parent | a186312832207437e4783024dcdece5232ac6c39 (diff) | |
download | php-git-24b72e7a277ad3b9127833c7c61bd5a8f5fee02e.tar.gz |
fix windows build
-rw-r--r-- | ext/session/mod_files.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index a9501b2529..36612ea975 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -50,6 +50,12 @@ #define FILE_PREFIX "sess_" +#ifdef PHP_WIN32 +# ifndef O_NOFOLLOW +# define O_NOFOLLOW 0 +# endif +#endif + typedef struct { int fd; char *lastkey; @@ -166,7 +172,7 @@ static void ps_files_open(ps_files *data, const char *key TSRMLS_DC) } data->lastkey = estrdup(key); - + /* O_NOFOLLOW to prevent us from following evil symlinks */ #ifdef O_NOFOLLOW data->fd = VCWD_OPEN_MODE(buf, O_CREAT | O_RDWR | O_BINARY | O_NOFOLLOW, data->filemode); |