summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2015-12-01 10:35:32 +0800
committerXinchen Hui <laruence@gmail.com>2015-12-01 10:35:32 +0800
commited4b887cf6e59c12428ebece5492201c63bfbb4f (patch)
treec52b1fa65c1b2028984e8c10f3c7f01c59f94123 /ext
parent00e3b7614e5f6d845f1135d2e559638be525af24 (diff)
downloadphp-git-ed4b887cf6e59c12428ebece5492201c63bfbb4f.tar.gz
Fixed bug #70991 (zend_file_cache.c:710: error: array type has incomplete element type)
Diffstat (limited to 'ext')
-rw-r--r--ext/opcache/config.m42
-rw-r--r--ext/opcache/zend_file_cache.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
index fbe18f8e2c..497aa4c79a 100644
--- a/ext/opcache/config.m4
+++ b/ext/opcache/config.m4
@@ -26,6 +26,8 @@ if test "$PHP_OPCACHE" != "no"; then
AC_DEFINE(HAVE_MPROTECT, 1, [Define if you have mprotect() function])
])
+ AC_CHECK_HEADERS([unistd.h sys/uio.h])
+
AC_MSG_CHECKING(for sysvipc shared memory support)
AC_TRY_RUN([
#include <sys/types.h>
diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache.c
index 7c615e927b..993358bdf5 100644
--- a/ext/opcache/zend_file_cache.c
+++ b/ext/opcache/zend_file_cache.c
@@ -706,7 +706,7 @@ int zend_file_cache_script_store(zend_persistent_script *script, int in_shm)
int fd;
char *filename;
zend_file_cache_metainfo info;
-#ifndef ZEND_WIN32
+#ifdef HAVE_SYS_UIO_H
struct iovec vec[3];
#endif
void *mem, *buf;
@@ -761,7 +761,7 @@ int zend_file_cache_script_store(zend_persistent_script *script, int in_shm)
info.checksum = zend_adler32(ADLER32_INIT, buf, script->size);
info.checksum = zend_adler32(info.checksum, (signed char*)ZSTR_VAL((zend_string*)ZCG(mem)), info.str_size);
-#ifndef ZEND_WIN32
+#ifdef HAVE_SYS_UIO_H
vec[0].iov_base = &info;
vec[0].iov_len = sizeof(info);
vec[1].iov_base = buf;