Hi
Iam trying to compile this extension with php 7.1 and php 8.1 but getting below error
[root@localhost ffmpeg-php-0.6.0]# make
/bin/sh /setups/ffmpeg-php-0.6.0/libtool --mode=compile cc -I. -I/setups/ffmpeg-php-0.6.0 -I/setups/ffmpeg-php-0.6.0/include -I/setups/ffmpeg-php-0.6.0/main -I/setups/ffmpeg-php-0.6.0 -I/usr/local/apps/php81/include/php -I/usr/local/apps/php81/include/php/main -I/usr/local/apps/php81/include/php/TSRM -I/usr/local/apps/php81/include/php/Zend -I/usr/local/apps/php81/include/php/ext -I/usr/local/apps/php81/include/php/ext/date/lib -I/usr/local/apps/ffmpeg//include/libavcodec/ -I/usr/local/apps/ffmpeg//include/libavformat/ -I/usr/local/apps/ffmpeg//include/libavutil/ -I/usr/local/apps/ffmpeg//include/libswscale/ -I/usr/local/apps/ffmpeg//include/libavfilter/ -I/usr/local/apps/ffmpeg//include/libavdevice/ -I/usr/local/apps/ffmpeg/include -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -DZEND_COMPILE_DL_EXT=1 -c /setups/ffmpeg-php-0.6.0/ffmpeg-php.c -o ffmpeg-php.lo -MMD -MF ffmpeg-php.dep -MT ffmpeg-php.lo
mkdir .libs
cc -I. -I/setups/ffmpeg-php-0.6.0 -I/setups/ffmpeg-php-0.6.0/include -I/setups/ffmpeg-php-0.6.0/main -I/setups/ffmpeg-php-0.6.0 -I/usr/local/apps/php81/include/php -I/usr/local/apps/php81/include/php/main -I/usr/local/apps/php81/include/php/TSRM -I/usr/local/apps/php81/include/php/Zend -I/usr/local/apps/php81/include/php/ext -I/usr/local/apps/php81/include/php/ext/date/lib -I/usr/local/apps/ffmpeg//include/libavcodec/ -I/usr/local/apps/ffmpeg//include/libavformat/ -I/usr/local/apps/ffmpeg//include/libavutil/ -I/usr/local/apps/ffmpeg//include/libswscale/ -I/usr/local/apps/ffmpeg//include/libavfilter/ -I/usr/local/apps/ffmpeg//include/libavdevice/ -I/usr/local/apps/ffmpeg/include -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -DZEND_COMPILE_DL_EXT=1 -c /setups/ffmpeg-php-0.6.0/ffmpeg-php.c -MMD -MF ffmpeg-php.dep -MT ffmpeg-php.lo -fPIC -DPIC -o .libs/ffmpeg-php.o
In file included from /usr/include/sys/stat.h:106:0,
from /usr/local/apps/php81/include/php/Zend/zend_stream.h:26,
from /usr/local/apps/php81/include/php/Zend/zend.h:38,
from /usr/local/apps/php81/include/php/main/php.h:31,
from /setups/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
/usr/include/bits/stat.h:91:21: error: field ‘st_atim’ has incomplete type
struct timespec st_atim; / Time of last access. /
^
/usr/include/bits/stat.h:92:21: error: field ‘st_mtim’ has incomplete type
struct timespec st_mtim; / Time of last modification. /
^
/usr/include/bits/stat.h:93:21: error: field ‘st_ctim’ has incomplete type
struct timespec st_ctim; / Time of last status change. /
^
/usr/include/bits/stat.h:152:21: error: field ‘st_atim’ has incomplete type
struct timespec st_atim; / Time of last access. /
^
/usr/include/bits/stat.h:153:21: error: field ‘st_mtim’ has incomplete type
struct timespec st_mtim; / Time of last modification. /
^
/usr/include/bits/stat.h:154:21: error: field ‘st_ctim’ has incomplete type
struct timespec st_ctim; / Time of last status change. /
^
In file included from /usr/local/apps/php81/include/php/Zend/zend_stream.h:26:0,
from /usr/local/apps/php81/include/php/Zend/zend.h:38,
from /usr/local/apps/php81/include/php/main/php.h:31,
from /setups/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
/usr/include/sys/stat.h:366:31: error: array type has incomplete element type
const struct timespec __times[2],
^
/usr/include/sys/stat.h:373:54: error: array type has incomplete element type
extern int futimens (int __fd, const struct timespec __times[2]) __THROW;
^
In file included from /usr/local/apps/php81/include/php/main/php.h:423:0,
from /setups/ffmpeg-php-0.6.0/ffmpeg-php.c:40:
/usr/local/apps/php81/include/php/Zend/zend_virtual_cwd.h:209:2: error: unknown type name ‘time_t’
time_t expires;
^
/usr/local/apps/php81/include/php/Zend/zend_virtual_cwd.h:240:89: error: unknown type name ‘time_t’
CWD_API realpath_cache_bucket realpath_cache_lookup(const char path, size_t path_len, time_t t);
^
In file included from /usr/local/apps/ffmpeg/include/libavutil/avutil.h:301:0,
from /usr/local/apps/ffmpeg//include/libavcodec/avcodec.h:32,
from /setups/ffmpeg-php-0.6.0/ffmpeg-php.c:42:
/usr/local/apps/ffmpeg/include/libavutil/common.h: In function ‘av_sat_add64_c’:
/usr/local/apps/ffmpeg/include/libavutil/common.h:354:20: warning: suggest parentheses around arithmetic in operand of ‘|’ [-Wparentheses]
if ((int64_t)(a^b | ~s^b) >= 0)
^
/setups/ffmpeg-php-0.6.0/ffmpeg-php.c: In function ‘zm_startup_ffmpeg’:
/setups/ffmpeg-php-0.6.0/ffmpeg-php.c:94:5: warning: implicit declaration of function ‘avcodec_init’ [-Wimplicit-function-declaration]
avcodec_init();
^
/setups/ffmpeg-php-0.6.0/ffmpeg-php.c:97:5: warning: implicit declaration of function ‘av_register_all’ [-Wimplicit-function-declaration]
av_register_all();
^
make: *** [ffmpeg-php.lo] Error 1
can you please provide any solution ??
thanks for helping in advance.