openbsd-ports/www/pecl-memcache/patches/patch-memcache_pool_h
william c89828902e Update to 3.0.4, and include a patch to fix compile from their svn. Fixes
PHP session storage and now does locking which helps some apps.

MAINTAINER change and diff ok alek@ jasper@
2010-04-06 02:08:45 +00:00

40 lines
929 B
Plaintext

$OpenBSD: patch-memcache_pool_h,v 1.1 2010/04/06 02:08:45 william Exp $
Fixed PECL bug #16059 (Build error: 'MSG_NOSIGNAL' undeclared)
svn revision 277039
--- memcache_pool.h.orig Sun Feb 22 11:01:43 2009
+++ memcache_pool.h Thu Mar 18 13:46:55 2010
@@ -25,6 +25,14 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
#include <stdint.h>
#include <string.h>
@@ -40,6 +48,15 @@
#else
#define ZSTR_VAL(v) (v).s
#endif
+
+/*
+ * Mac OS X has no MSG_NOSIGNAL but >= 10.2 comes with SO_NOSIGPIPE which is a setsockopt() option
+ * and not a send() parameter as MSG_NOSIGNAL. OpenBSD has none of the options so we need to ignore
+ * SIGPIPE events
+ */
+#ifndef MSG_NOSIGNAL
+#define MSG_NOSIGNAL 0
+#endif /*MSG_NOSIGNAL*/
/* use lowest byte for flags */
#define MMC_SERIALIZED 0x0001