summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-04-14 23:34:50 +0200
committerAnatol Belski <ab@php.net>2014-04-14 23:34:50 +0200
commit634e6b61d9495226ee48bf12ae5be2e57fb254d6 (patch)
treedf1b270248734c790387fab0b4823fd267f581c5
parent6adc84a701797c22888d33478b7591337c476c01 (diff)
parent793f67e85213f789ace0c766c13815a6025a2059 (diff)
downloadphp-git-634e6b61d9495226ee48bf12ae5be2e57fb254d6.tar.gz
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: fix windows build
-rw-r--r--ext/session/mod_files.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c
index e435246eb9..33e177c5df 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;
@@ -135,7 +141,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);