Skip to content

Commit 634e6b6

Browse files
committed
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: fix windows build
2 parents 6adc84a + 793f67e commit 634e6b6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ext/session/mod_files.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@
5050

5151
#define FILE_PREFIX "sess_"
5252

53+
#ifdef PHP_WIN32
54+
# ifndef O_NOFOLLOW
55+
# define O_NOFOLLOW 0
56+
# endif
57+
#endif
58+
5359
typedef struct {
5460
int fd;
5561
char *lastkey;
@@ -135,7 +141,7 @@ static void ps_files_open(ps_files *data, const char *key TSRMLS_DC)
135141
}
136142

137143
data->lastkey = estrdup(key);
138-
144+
139145
/* O_NOFOLLOW to prevent us from following evil symlinks */
140146
#ifdef O_NOFOLLOW
141147
data->fd = VCWD_OPEN_MODE(buf, O_CREAT | O_RDWR | O_BINARY | O_NOFOLLOW, data->filemode);

0 commit comments

Comments
 (0)