summaryrefslogtreecommitdiff
path: root/main/php_open_temporary_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/php_open_temporary_file.c')
-rw-r--r--main/php_open_temporary_file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c
index 50a0879c1a..68d4edcde2 100644
--- a/main/php_open_temporary_file.c
+++ b/main/php_open_temporary_file.c
@@ -22,6 +22,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+
#ifdef PHP_WIN32
#include <windows.h>
#include <winsock.h>
@@ -35,7 +36,6 @@
#include <netdb.h>
#include <arpa/inet.h>
#endif
-#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
@@ -86,7 +86,9 @@ static FILE *php_do_open_temporary_file(char *path, const char *pfx, char **open
char *trailing_slash;
FILE *fp;
char *opened_path;
+#ifndef PHP_WIN32
int fd;
+#endif
if (!path) {
return NULL;