summaryrefslogtreecommitdiff
path: root/www/php4-apc
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-10-29 19:33:49 +0000
committerjlam <jlam@pkgsrc.org>2001-10-29 19:33:49 +0000
commit573f745fb11d3833caade95e6b478180f3e70f34 (patch)
treeb2c55a78bc5df9b2f4d047d3cea7840b858116ef /www/php4-apc
parentb3dec5f5445ff427ef56c21dc156f9a7f8545f26 (diff)
downloadpkgsrc-573f745fb11d3833caade95e6b478180f3e70f34.tar.gz
Some NetBSD releases don't have SHM_{R,W} so use the S_I{R,W}{USR,GRP,OTH}
flags instead.
Diffstat (limited to 'www/php4-apc')
-rw-r--r--www/php4-apc/distinfo3
-rw-r--r--www/php4-apc/patches/patch-ad31
2 files changed, 33 insertions, 1 deletions
diff --git a/www/php4-apc/distinfo b/www/php4-apc/distinfo
index 5a0483bd415..e2eab2c1834 100644
--- a/www/php4-apc/distinfo
+++ b/www/php4-apc/distinfo
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.1.1.1 2001/10/29 16:50:16 jlam Exp $
+$NetBSD: distinfo,v 1.2 2001/10/29 19:33:49 jlam Exp $
SHA1 (apc-1.1.0pl1.tar.gz) = 7deac1c4c1989ab4cf9e2b9f16b7823d3731b6b4
Size (apc-1.1.0pl1.tar.gz) = 240886 bytes
SHA1 (patch-aa) = 20cf6cc1568979a1a3d103c40f62463ae2354e3e
SHA1 (patch-ab) = a3794f8bf99e603ea8b0c9849475450c22c78b9e
SHA1 (patch-ac) = 309224a4b0bc7a20a1748708785ee7df1d10ad42
+SHA1 (patch-ad) = 5ecbaeff574a696d5c4106dc2ec419cdceb25d16
diff --git a/www/php4-apc/patches/patch-ad b/www/php4-apc/patches/patch-ad
new file mode 100644
index 00000000000..29582fda2ea
--- /dev/null
+++ b/www/php4-apc/patches/patch-ad
@@ -0,0 +1,31 @@
+$NetBSD: patch-ad,v 1.1 2001/10/29 19:33:50 jlam Exp $
+
+--- apc_shm.c.orig Sat Mar 24 17:15:50 2001
++++ apc_shm.c
+@@ -22,12 +22,17 @@
+ #include <errno.h>
+ #include <string.h>
+
++#if defined(__NetBSD__)
++#define IPC_PERMS ((S_IRUSR|S_IWUSR) | (S_IRGRP|S_IWGRP) | (S_IROTH|S_IWOTH))
++#else
+ #ifndef SHM_R
+ # define SHM_R 0444 /* read permission */
+ #endif
+ #ifndef SHM_A
+ # define SHM_A 0222 /* write permission */
+ #endif
++#define IPC_PERMS (SHM_R|SHM_A)
++#endif
+
+ /* apc_shm_create: create a shared memory segment of given size */
+ int apc_shm_create(const char* pathname, int proj, int size)
+@@ -44,7 +49,7 @@
+ }
+ }
+
+- oflag = IPC_CREAT | SHM_R | SHM_A;
++ oflag = IPC_CREAT | IPC_PERMS;
+ if ((shmid = shmget(key, size, oflag)) < 0) {
+ apc_eprint("apc_shmcreate: shmget(%d, %d,%d) failed: %s", key, size, oflag, strerror(errno));
+ }