@@ -392,19 +392,6 @@ if [ "$IS_CROSSCOMPILE" == "yes" ]; then
392392 OPENSSL_TARGET=" linux-aarch64"
393393 export ac_cv_func_fnmatch_works=yes # musl should be OK
394394
395- # workarounds for musl 1.2.5, PHP 8.4
396- export php_cv_type_cookie_off64_t=no
397- # we don't need these but these also no longer use off64_t
398- # define them in case someone wants to build an extension which needs them
399- export php_cv_func_pread=yes
400- export php_cv_func_pwrite=yes
401-
402- # workarounds for musl 1.2.5, <= PHP 8.3
403- export cookie_io_functions_use_off64_t=no
404- # we don't need these but these also no longer use off64_t
405- # define them in case someone wants to build an extension which needs them
406- export ac_cv_pread=yes
407- export ac_cv_pwrite=yes
408395 write_out " INFO" " Cross-compiling for Android ARMv8 (aarch64)"
409396 # TODO: add cross-compile for aarch64 platforms (ios, rpi)
410397 else
@@ -1188,6 +1175,16 @@ if [ "$IS_CROSSCOMPILE" == "yes" ]; then
11881175 if [ " $COMPILE_FOR_ANDROID " == " no" ]; then
11891176 export LIBS=" $LIBS -lpthread -ldl -lresolv"
11901177 else
1178+ # workarounds for musl 1.2.5
1179+ if [ " $PHP_VERSION_ID " -lt 80400 ]; then
1180+ sed -i=" .backup" ' s/cookie_io_functions_use_off64_t=yes/cookie_io_functions_use_off64_t=no/' ./configure
1181+ export ac_cv_pread=yes
1182+ export ac_cv_pwrite=yes
1183+ else
1184+ export php_cv_type_cookie_off64_t=no
1185+ export php_cv_func_pread=yes
1186+ export php_cv_func_pwrite=yes
1187+ fi
11911188 export LIBS=" $LIBS -lpthread -lresolv"
11921189 fi
11931190 else
0 commit comments