Skip to content

Commit 24b72e7

Browse files
committed
fix windows build
1 parent a186312 commit 24b72e7

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;
@@ -166,7 +172,7 @@ static void ps_files_open(ps_files *data, const char *key TSRMLS_DC)
166172
}
167173

168174
data->lastkey = estrdup(key);
169-
175+
170176
/* O_NOFOLLOW to prevent us from following evil symlinks */
171177
#ifdef O_NOFOLLOW
172178
data->fd = VCWD_OPEN_MODE(buf, O_CREAT | O_RDWR | O_BINARY | O_NOFOLLOW, data->filemode);

0 commit comments

Comments
 (0)