]> granicus.if.org Git - php/commitdiff
fix windows build
authorAnatol Belski <ab@php.net>
Mon, 14 Apr 2014 21:29:38 +0000 (23:29 +0200)
committerAnatol Belski <ab@php.net>
Mon, 14 Apr 2014 21:29:38 +0000 (23:29 +0200)
ext/session/mod_files.c

index a9501b2529dc948eb2eca6decddd3a9f1f260126..36612ea97501edd18e963880c046655879b3f85e 100644 (file)
 
 #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);