Bug #70991 [Fbk->Csd]: zend_file_cache.c:710: error: array type has incomplete element type

From: Date: Tue, 01 Dec 2015 02:36:00 +0000
Subject: Bug #70991 [Fbk->Csd]: zend_file_cache.c:710: error: array type has incomplete element type
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197531@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70991&edit=1 ID: 70991 Updated by: laruence@php.net Reported by: swa at section66 dot com Summary: zend_file_cache.c:710: error: array type has incomplete element type -Status: Feedback +Status: Closed Type: Bug Package: Compile Failure Operating System: OpenBSD PHP Version: 7.0.0RC8 Assigned To: laruence Block user comment: N Private report: N New Comment: Automatic comment on behalf of laruence@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=ed4b887cf6e59c12428ebece5492201c63bfbb4f Log: Fixed bug #70991 (zend_file_cache.c:710: error: array type has incomplete element type) Previous Comments: ------------------------------------------------------------------------ [2015-11-29 03:22:10] laruence@php.net I don't have openBSD box, so I can not verify it, and please make sure the HAVE_SYS_UIO_H is defined in main/php_config.h 1. ./buildconf --force . 2. ./configure 3. make ------------------------------------------------------------------------ [2015-11-29 03:16:23] laruence@php.net can you verify this fix? diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 index fbe18f8..497aa4c 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 7c615e9..993358b 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; note before you make, you should do ./buildconf --force to regenerate ./configure ------------------------------------------------------------------------ [2015-11-28 21:25:02] swa at section66 dot com Description: ------------ CFLAGS='-O2' './configure' '--prefix=/<PATH>/php-7.0.0RC8' '--with-apxs2=<PATH>/bin/apxs' '--with-zlib' '--with-gd' '--enable-exif' '--with-jpeg-dir=/usr/local/lib' '--enable-gd-native-ttf' '--with-zlib-dir=/usr/lib/' '--with-png-dir=/usr/local/' '--enable-ftp' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-config-file-path=/etc/php.ini' '--enable-mbstring' (or even a plain ./configure without ANY options) After a while (depending on what options were selected): /<PATH>/php-7.0.0RC8/ext/opcache/zend_file_cache.c:710: error: array type has incomplete element type *** Error code 1 Line 710: #ifndef ZEND_WIN32 struct iovec vec[3]; #endif iovec on OpenBSD is defined in sys/uio.h, I guess the ./configure missed that. [Not familiar with it enough myself to propose a fix, sorry] ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70991&edit=1

« previous php.bugs (#197531) next »