[Kroupware] patch to compile php-4.3.0 with glibc-2.3

Frederik Himpe kroupware@mail.kde.org
25 Mar 2003 13:29:16 +0100


--=-HhgO9qmHn4qF9gJjmKA6
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi,

To successfully compile the kolab's apache/php package on my Mandrake
9.1 system (with glibc 2.3.1), I had to apply this patch. Otherwise
there were unresolved references to errno.

Frederik Himpe
-- 
http://www.arafox.com

--=-HhgO9qmHn4qF9gJjmKA6
Content-Disposition: attachment; filename=php4.3.0-glibc2.3.patch
Content-Type: text/x-patch; name=php4.3.0-glibc2.3.patch; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit

diff -p -u3 -r php-4.3.0-bak/ext/mysql/libmysql/my_delete.c php-4.3.0/ext/mysql/libmysql/my_delete.c
--- php-4.3.0-bak/ext/mysql/libmysql/my_delete.c	2003-03-25 11:46:27.000000000 +0100
+++ php-4.3.0/ext/mysql/libmysql/my_delete.c	2003-03-25 11:48:55.000000000 +0100
@@ -4,7 +4,7 @@ This file is public domain and comes wit
 #include "mysys_priv.h"
 
 #include "mysys_err.h"
-
+#include <errno.h>
 int my_delete(const char *name, myf MyFlags)
 {
   int err;
diff -p -u3 -r php-4.3.0-bak/ext/mysql/libmysql/my_error.c php-4.3.0/ext/mysql/libmysql/my_error.c
--- php-4.3.0-bak/ext/mysql/libmysql/my_error.c	2003-03-25 11:46:27.000000000 +0100
+++ php-4.3.0/ext/mysql/libmysql/my_error.c	2003-03-25 11:49:18.000000000 +0100
@@ -6,7 +6,7 @@ This file is public domain and comes wit
 #include <m_string.h>
 #include <stdarg.h>
 #include <m_ctype.h>
-
+#include <errno.h>
 /* Define some external variables for error handling */
 
 const char ** NEAR my_errmsg[MAXMAPS]={0,0,0,0};
diff -p -u3 -r php-4.3.0-bak/ext/mysql/libmysql/my_getwd.c php-4.3.0/ext/mysql/libmysql/my_getwd.c
--- php-4.3.0-bak/ext/mysql/libmysql/my_getwd.c	2003-03-25 11:46:27.000000000 +0100
+++ php-4.3.0/ext/mysql/libmysql/my_getwd.c	2003-03-25 11:49:49.000000000 +0100
@@ -17,7 +17,7 @@ This file is public domain and comes wit
 #if defined(OS2)
 #include <direct.h>
 #endif
-
+#include <errno.h>
 #ifdef __EMX__
 /* chdir2 support also drive change */
 #define chdir _chdir2
diff -p -u3 -r php-4.3.0-bak/ext/mysql/libmysql/my_lib.c php-4.3.0/ext/mysql/libmysql/my_lib.c
--- php-4.3.0-bak/ext/mysql/libmysql/my_lib.c	2003-03-25 11:46:27.000000000 +0100
+++ php-4.3.0/ext/mysql/libmysql/my_lib.c	2003-03-25 11:47:45.000000000 +0100
@@ -49,6 +49,7 @@ This file is public domain and comes wit
 #define READDIR(A,B,C) (!(C=readdir(A)))
 #endif
 
+#include <errno.h>
 
 #define STARTSIZE	ONCE_ALLOC_INIT*8  /* some mallocmargin */
 
diff -p -u3 -r php-4.3.0-bak/ext/mysql/libmysql/my_malloc.c php-4.3.0/ext/mysql/libmysql/my_malloc.c
--- php-4.3.0-bak/ext/mysql/libmysql/my_malloc.c	2003-03-25 11:46:27.000000000 +0100
+++ php-4.3.0/ext/mysql/libmysql/my_malloc.c	2003-03-25 11:48:05.000000000 +0100
@@ -8,7 +8,7 @@ This file is public domain and comes wit
 #include "mysys_priv.h"
 #include "mysys_err.h"
 #include <m_string.h>
-
+#include <errno.h>
 	/* My memory allocator */
 
 gptr my_malloc(unsigned int Size, myf MyFlags)
diff -p -u3 -r php-4.3.0-bak/ext/mysql/libmysql/my_once.c php-4.3.0/ext/mysql/libmysql/my_once.c
--- php-4.3.0-bak/ext/mysql/libmysql/my_once.c	2003-03-25 11:46:27.000000000 +0100
+++ php-4.3.0/ext/mysql/libmysql/my_once.c	2003-03-25 11:50:43.000000000 +0100
@@ -10,7 +10,7 @@ This file is public domain and comes wit
 #include "mysys_priv.h"
 #include "my_static.h"
 #include "mysys_err.h"
-
+#include <errno.h>
 	/* alloc for things we don't nead to free */
 	/* No DBUG_ENTER... here to get smaller dbug-startup */
 
diff -p -u3 -r php-4.3.0-bak/ext/mysql/libmysql/my_realloc.c php-4.3.0/ext/mysql/libmysql/my_realloc.c
--- php-4.3.0-bak/ext/mysql/libmysql/my_realloc.c	2003-03-25 11:46:27.000000000 +0100
+++ php-4.3.0/ext/mysql/libmysql/my_realloc.c	2003-03-25 11:48:40.000000000 +0100
@@ -7,7 +7,7 @@ This file is public domain and comes wit
 
 #include "mysys_priv.h"
 #include "mysys_err.h"
-
+#include <errno.h>
 	/* My memory re allocator */
 
 gptr my_realloc(gptr oldpoint, uint Size, myf MyFlags)
diff -p -u3 -r php-4.3.0-bak/ext/mysql/libmysql/my_tempnam.c php-4.3.0/ext/mysql/libmysql/my_tempnam.c
--- php-4.3.0-bak/ext/mysql/libmysql/my_tempnam.c	2003-03-25 11:46:27.000000000 +0100
+++ php-4.3.0/ext/mysql/libmysql/my_tempnam.c	2003-03-25 11:48:27.000000000 +0100
@@ -12,6 +12,7 @@ This file is public domain and comes wit
 #include <m_string.h>
 #include "my_static.h"
 #include "mysys_err.h"
+#include <errno.h>
 
 #define TMP_EXT ".tmp"				/* Extension of tempfile  */
 #if ! defined(P_tmpdir)
diff -p -u3 -r php-4.3.0-bak/ext/mysql/libmysql/safemalloc.c php-4.3.0/ext/mysql/libmysql/safemalloc.c
--- php-4.3.0-bak/ext/mysql/libmysql/safemalloc.c	2003-03-25 11:46:27.000000000 +0100
+++ php-4.3.0/ext/mysql/libmysql/safemalloc.c	2003-03-25 12:38:47.000000000 +0100
@@ -58,7 +58,7 @@ This file is public domain and comes wit
 #include <m_string.h>
 #include "my_static.h"
 #include "mysys_err.h"
-
+#include <errno.h>
 ulonglong safemalloc_mem_limit = ~(ulonglong)0;
 
 #define pNext		tInt._pNext

--=-HhgO9qmHn4qF9gJjmKA6--