[packages/php/PHP_5_5] more configure fixes
atler
atler at pld-linux.org
Thu Jan 30 03:08:32 CET 2025
commit 265cebc0d11c04e1836220f43a830f36c5427951
Author: Jan Palus <atler at pld-linux.org>
Date: Fri Jan 24 21:04:24 2025 +0100
more configure fixes
configure.patch | 235 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
php.spec | 2 +-
readdir_r.patch | 17 ----
3 files changed, 236 insertions(+), 18 deletions(-)
---
diff --git a/php.spec b/php.spec
index d64b4d5..1fda205 100644
--- a/php.spec
+++ b/php.spec
@@ -228,7 +228,7 @@ Patch70: php-icu64.patch
Patch71: icu69.patch
Patch72: icu70.patch
Patch73: libxml2-2.12.patch
-Patch74: readdir_r.patch
+Patch74: configure.patch
Patch75: types.patch
URL: https://www.php.net/
%{?with_interbase:%{!?with_interbase_inst:BuildRequires: Firebird-devel >= 1.0.2.908-2}}
diff --git a/configure.patch b/configure.patch
new file mode 100644
index 0000000..e4caf88
--- /dev/null
+++ b/configure.patch
@@ -0,0 +1,235 @@
+--- php-7.2.34/acinclude.m4.orig 2025-01-23 20:45:18.432571977 +0100
++++ php-7.2.34/acinclude.m4 2025-01-23 20:54:20.252520613 +0100
+@@ -1349,12 +1349,13 @@
+ #define _REENTRANT
+ #include <sys/types.h>
+ #include <dirent.h>
++#include <stdlib.h>
+
+ #ifndef PATH_MAX
+ #define PATH_MAX 1024
+ #endif
+
+-main() {
++int main() {
+ DIR *dir;
+ char entry[sizeof(struct dirent)+PATH_MAX];
+ struct dirent *pentry = (struct dirent *) &entry;
+--- php-7.2.34/acinclude.m4.orig 2025-01-24 18:36:21.516873084 +0100
++++ php-7.2.34/acinclude.m4 2025-01-24 20:22:44.293766361 +0100
+@@ -1157,7 +1157,7 @@
+ AC_TRY_RUN([
+ #include <time.h>
+
+-main() {
++int main() {
+ char buf[27];
+ struct tm t;
+ time_t old = 0;
+@@ -1210,8 +1210,9 @@
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <errno.h>
++#include <stdlib.h>
+ $1
+- main() {
++ int main() {
+ int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600);
+
+ if (fd < 0) exit(1);
+@@ -1240,8 +1241,9 @@
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <errno.h>
++#include <stdlib.h>
+ $1
+- main() {
++ int main() {
+ char buf[3];
+ int fd = open("conftest_in", O_RDONLY);
+ if (fd < 0) exit(1);
+@@ -1474,7 +1476,10 @@
+ dnl
+ AC_DEFUN([PHP_AC_BROKEN_SPRINTF],[
+ AC_CACHE_CHECK(whether sprintf is broken, ac_cv_broken_sprintf,[
+- AC_TRY_RUN([main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }],[
++ AC_TRY_RUN([
++#include <stdio.h>
++#include <stdlib.h>
++int main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }],[
+ ac_cv_broken_sprintf=no
+ ],[
+ ac_cv_broken_sprintf=yes
+@@ -1698,6 +1703,8 @@
+ AC_CACHE_VAL(_cv_have_broken_glibc_fopen_append,[
+ AC_TRY_RUN([
+ #include <stdio.h>
++#include <stdlib.h>
++#include <unistd.h>
+ int main(int argc, char *argv[])
+ {
+ FILE *fp;
+@@ -1765,6 +1772,7 @@
+ AC_TRY_RUN([
+ #define _GNU_SOURCE
+ #include <stdio.h>
++#include <stdlib.h>
+
+ struct cookiedata {
+ __off64_t pos;
+@@ -1781,7 +1789,7 @@
+
+ cookie_io_functions_t funcs = {reader, writer, seeker, closer};
+
+-main() {
++int main() {
+ struct cookiedata g = { 0 };
+ FILE *fp = fopencookie(&g, "r", funcs);
+
+@@ -1898,7 +1906,7 @@
+ if test "$found" = "yes"; then
+ ac_libs=$LIBS
+ LIBS="$LIBS -l$2"
+- AC_TRY_RUN([main() { return (0); }],[found=yes],[found=no],[found=no])
++ AC_TRY_RUN([int main() { return (0); }],[found=yes],[found=no],[found=no])
+ LIBS=$ac_libs
+ fi
+
+@@ -2951,7 +2959,7 @@
+
+ #define TEXT "This is the test message -- "
+
+-main()
++int main()
+ {
+ int n;
+
+--- php-7.2.34/configure.in.orig 2025-01-24 18:36:21.610206957 +0100
++++ php-7.2.34/configure.in 2025-01-24 19:52:10.669915792 +0100
+@@ -697,6 +697,8 @@
+ #ifndef AF_INET
+ # include <sys/socket.h>
+ #endif
++#include <string.h>
++#include <stdlib.h>
+ int main(void) {
+ struct addrinfo *ai, *pai, hints;
+
+#if HAVE_CRYPT
+--- php-7.2.34/Zend/Zend.m4.orig 2020-09-30 07:15:55.000000000 +0200
++++ php-7.2.34/Zend/Zend.m4 2025-01-24 20:27:19.468520028 +0100
+@@ -111,6 +111,7 @@
+
+ AC_TRY_RUN([
+ #include <limits.h>
++#include <stdlib.h>
+
+ int main()
+ {
+@@ -224,6 +225,7 @@
+
+ AC_TRY_RUN([
+ #include <stdio.h>
++#include <stdlib.h>
+
+ typedef union _mm_align_test {
+ void *ptr;
+@@ -321,6 +323,7 @@
+ #include <sys/mman.h>
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <unistd.h>
+ #ifndef MAP_ANON
+ # ifdef MAP_ANONYMOUS
+ # define MAP_ANON MAP_ANONYMOUS
+--- php-5.5.38/ext/standard/config.m4.orig 2016-07-20 10:41:48.000000000 +0200
++++ php-5.5.38/ext/standard/config.m4 2025-01-29 22:44:40.021689011 +0100
+@@ -7,6 +7,8 @@
+ AC_TRY_RUN( [
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
+
+ int main(int argc, char **argv)
+ {
+@@ -68,7 +70,10 @@
+ #if HAVE_CRYPT_H
+ #include <crypt.h>
+ #endif
++#include <stdlib.h>
++#include <string.h>
+
++int
+ main() {
+ #if HAVE_CRYPT
+ exit (strcmp((char *)crypt("rasmuslerdorf","rl"),"rl.3StKT.4T8M"));
+@@ -92,7 +97,10 @@
+ #if HAVE_CRYPT_H
+ #include <crypt.h>
+ #endif
++#include <stdlib.h>
++#include <string.h>
+
++int
+ main() {
+ #if HAVE_CRYPT
+ exit (strcmp((char *)crypt("rasmuslerdorf","_J9..rasm"),"_J9..rasmBYk8r9AiWNc"));
+@@ -116,7 +124,10 @@
+ #if HAVE_CRYPT_H
+ #include <crypt.h>
+ #endif
++#include <stdlib.h>
++#include <string.h>
+
++int
+ main() {
+ #if HAVE_CRYPT
+ char salt[15], answer[40];
+@@ -149,7 +160,10 @@
+ #if HAVE_CRYPT_H
+ #include <crypt.h>
+ #endif
++#include <stdlib.h>
++#include <string.h>
+
++int
+ main() {
+ #if HAVE_CRYPT
+ char salt[30], answer[70];
+@@ -179,7 +193,10 @@
+ #if HAVE_CRYPT_H
+ #include <crypt.h>
+ #endif
++#include <stdlib.h>
++#include <string.h>
+
++int
+ main() {
+ #if HAVE_CRYPT
+ char salt[21], answer[21+86];
+@@ -208,7 +225,10 @@
+ #if HAVE_CRYPT_H
+ #include <crypt.h>
+ #endif
++#include <stdlib.h>
++#include <string.h>
+
++int
+ main() {
+ #if HAVE_CRYPT
+ char salt[21], answer[21+43];
+--- php-7.2.34/Zend/acinclude.m4.orig 2020-09-30 07:15:55.000000000 +0200
++++ php-7.2.34/Zend/acinclude.m4 2025-01-24 20:51:32.443588605 +0100
+@@ -67,7 +67,10 @@
+ dnl
+ AC_DEFUN([AC_ZEND_BROKEN_SPRINTF],[
+ AC_CACHE_CHECK(whether sprintf is broken, ac_cv_broken_sprintf,[
+- AC_TRY_RUN([main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }],[
++ AC_TRY_RUN([
++#include <stdio.h>
++#include <stdlib.h>
++int main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }],[
+ ac_cv_broken_sprintf=no
+ ],[
+ ac_cv_broken_sprintf=yes
diff --git a/readdir_r.patch b/readdir_r.patch
deleted file mode 100644
index 4359425..0000000
--- a/readdir_r.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- php-7.2.34/acinclude.m4.orig 2025-01-23 20:45:18.432571977 +0100
-+++ php-7.2.34/acinclude.m4 2025-01-23 20:54:20.252520613 +0100
-@@ -1349,12 +1349,13 @@
- #define _REENTRANT
- #include <sys/types.h>
- #include <dirent.h>
-+#include <stdlib.h>
-
- #ifndef PATH_MAX
- #define PATH_MAX 1024
- #endif
-
--main() {
-+int main() {
- DIR *dir;
- char entry[sizeof(struct dirent)+PATH_MAX];
- struct dirent *pentry = (struct dirent *) &entry;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php.git/commitdiff/a6b87e4f9cd97cf0189586b11bcfb1797322a3c4
More information about the pld-cvs-commit
mailing list