aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorale <ale@FreeBSD.org>2007-02-23 15:33:59 +0800
committerale <ale@FreeBSD.org>2007-02-23 15:33:59 +0800
commitbefc763387d4724fb1068e1619d313dae87f7bd1 (patch)
tree640a75fbd4599c515db9077d5cbc1eaa62357fac /sysutils
parentc2830a901657ce6a014284d0f4cf248e93de8ff2 (diff)
downloadfreebsd-ports-graphics-befc763387d4724fb1068e1619d313dae87f7bd1.tar.gz
freebsd-ports-graphics-befc763387d4724fb1068e1619d313dae87f7bd1.tar.zst
freebsd-ports-graphics-befc763387d4724fb1068e1619d313dae87f7bd1.zip
Fix for missing implementation of a few sysconf parameters.
Submitted by: stas
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/php5-posix/Makefile2
-rw-r--r--sysutils/php5-posix/files/patch-posix.c39
2 files changed, 41 insertions, 0 deletions
diff --git a/sysutils/php5-posix/Makefile b/sysutils/php5-posix/Makefile
index 85802977d06..baac57e2511 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 00000000000..7dc4a4b4476
--- /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);
+