From cc9a752a5f1e63e7f081bf8d254e56d2228c492a Mon Sep 17 00:00:00 2001 From: Alex Dupre Date: Fri, 23 Feb 2007 07:33:59 +0000 Subject: Fix for missing implementation of a few sysconf parameters. Submitted by: stas --- sysutils/php5-posix/Makefile | 2 ++ sysutils/php5-posix/files/patch-posix.c | 39 +++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 sysutils/php5-posix/files/patch-posix.c (limited to 'sysutils') diff --git a/sysutils/php5-posix/Makefile b/sysutils/php5-posix/Makefile index 85802977d06c..baac57e2511f 100644 --- a/sysutils/php5-posix/Makefile +++ b/sysutils/php5-posix/Makefile @@ -5,6 +5,8 @@ # $FreeBSD$ # +PORTREVISION= 3 + CATEGORIES= sysutils MASTERDIR= ${.CURDIR}/../../lang/php5 diff --git a/sysutils/php5-posix/files/patch-posix.c b/sysutils/php5-posix/files/patch-posix.c new file mode 100644 index 000000000000..7dc4a4b44762 --- /dev/null +++ b/sysutils/php5-posix/files/patch-posix.c @@ -0,0 +1,39 @@ +--- posix.c.orig Fri Feb 23 08:23:14 2007 ++++ posix.c Fri Feb 23 08:27:53 2007 +@@ -838,7 +838,7 @@ + #if defined(ZTS) && defined(HAVE_GETGRNAM_R) && defined(_SC_GETGR_R_SIZE_MAX) + buflen = sysconf(_SC_GETGR_R_SIZE_MAX); + if (buflen < 1) { +- RETURN_FALSE; ++ buflen = 1024; + } + buf = emalloc(buflen); + g = &gbuf; +@@ -887,6 +887,9 @@ + #ifdef HAVE_GETGRGID_R + + grbuflen = sysconf(_SC_GETGR_R_SIZE_MAX); ++ if (grbuflen < 1) { ++ grbuflen = 1024; ++ } + grbuf = emalloc(grbuflen); + + ret = getgrgid_r(gid, &_g, grbuf, grbuflen, &retgrptr); +@@ -951,7 +954,7 @@ + #if defined(ZTS) && defined(_SC_GETPW_R_SIZE_MAX) && defined(HAVE_GETPWNAM_R) + buflen = sysconf(_SC_GETPW_R_SIZE_MAX); + if (buflen < 1) { +- RETURN_FALSE; ++ buflen = 1024; + } + buf = emalloc(buflen); + pw = &pwbuf; +@@ -1000,7 +1003,7 @@ + #if defined(ZTS) && defined(_SC_GETPW_R_SIZE_MAX) && defined(HAVE_GETPWUID_R) + pwbuflen = sysconf(_SC_GETPW_R_SIZE_MAX); + if (pwbuflen < 1) { +- RETURN_FALSE; ++ pwbuflen = 1024; + } + pwbuf = emalloc(pwbuflen); + -- cgit v1.2.3