summaryrefslogtreecommitdiff
path: root/sysutils/php5-posix/files/patch-posix.c
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2007-02-23 07:33:59 +0000
committerAlex Dupre <ale@FreeBSD.org>2007-02-23 07:33:59 +0000
commitcc9a752a5f1e63e7f081bf8d254e56d2228c492a (patch)
tree4616c9708f090eca08e48b698f54bda949422c62 /sysutils/php5-posix/files/patch-posix.c
parentThis is a library for the Java platform which makes PKCS#11 (also known (diff)
Fix for missing implementation of a few sysconf parameters.
Submitted by: stas
Notes
Notes: svn path=/head/; revision=185730
Diffstat (limited to '')
-rw-r--r--sysutils/php5-posix/files/patch-posix.c39
1 files changed, 39 insertions, 0 deletions
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);
+