Skip to content

Commit 3d0e522

Browse files
committed
Fix build on Windows
1 parent 7a24d46 commit 3d0e522

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,12 @@ typedef int gid_t;
7676
#endif
7777
#include <fcntl.h>
7878
#include <signal.h>
79+
80+
#ifndef PHP_WIN32
7981
#include <time.h>
82+
#else
83+
#include "win32/time.h"
84+
#endif
8085

8186
#ifndef ZEND_WIN32
8287
# include <sys/types.h>
@@ -1167,7 +1172,7 @@ zend_result validate_timestamp_and_record(zend_persistent_script *persistent_scr
11671172
double revalidate_reference_time = 0.0;
11681173

11691174
if (ZCG(cli_mode)) {
1170-
#ifdef HAVE_GETTIMEOFDAY
1175+
#if HAVE_GETTIMEOFDAY
11711176
struct timeval tp = {0};
11721177

11731178
if (UNEXPECTED(gettimeofday(&tp, NULL) != 0)) {

0 commit comments

Comments
 (0)