summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--19.patch44
-rw-r--r--21.patch36
2 files changed, 80 insertions, 0 deletions
diff --git a/19.patch b/19.patch
new file mode 100644
index 0000000..8173a74
--- /dev/null
+++ b/19.patch
@@ -0,0 +1,44 @@
+From 72f8c65cb52859762d792eb80bde32129011bc09 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 22 Mar 2018 13:16:14 +0100
+Subject: [PATCH] add dependency on json extension
+
+---
+ .gitignore | 1 +
+ config.m4 | 1 +
+ nsq.c | 9 ++++++++-
+ 3 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/config.m4 b/config.m4
+index 9af9b72..c9227a9 100644
+--- a/config.m4
++++ b/config.m4
+@@ -112,4 +112,5 @@ echo "libevent-path:$LIBEVENT_DIR";
+ PHP_SUBST(NSQ_SHARED_LIBADD)
+
+ PHP_NEW_EXTENSION(nsq, nsq.c pub.c nsq_lookupd.c message.c sub.c command.c common.c, $ext_shared)
++ PHP_ADD_EXTENSION_DEP(nsq, json, true)
+ fi
+diff --git a/nsq.c b/nsq.c
+index df15306..1b43bae 100644
+--- a/nsq.c
++++ b/nsq.c
+@@ -493,10 +493,17 @@ PHP_MINFO_FUNCTION (nsq)
+ }
+ /* }}} */
+
++static const zend_module_dep nsq_deps[] = {
++ ZEND_MOD_REQUIRED("json")
++ ZEND_MOD_END
++};
++
+ /* {{{ nsq_module_entry
+ */
+ zend_module_entry nsq_module_entry = {
+- STANDARD_MODULE_HEADER,
++ STANDARD_MODULE_HEADER_EX,
++ NULL,
++ nsq_deps,
+ "nsq",
+ NULL, //nsq_functions,
+ PHP_MINIT(nsq),
diff --git a/21.patch b/21.patch
new file mode 100644
index 0000000..c5b6154
--- /dev/null
+++ b/21.patch
@@ -0,0 +1,36 @@
+From 6bbad6ea8b3c0d2a75dfc8af983d217fd30f71c1 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 22 Mar 2018 13:53:35 +0100
+Subject: [PATCH] fix buld warning [-Wimplicit-function-declaration]
+
+---
+ config.m4 | 1 +
+ nsq.c | 3 +++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/config.m4 b/config.m4
+index 9af9b72..0366929 100644
+--- a/config.m4
++++ b/config.m4
+@@ -66,6 +66,7 @@ echo "libevent-path:$LIBEVENT_DIR";
+ -l$LIBNAME
+ ])
+
++ AC_CHECK_HEADERS([sys/wait.h])
+
+
+ dnl PHP_ADD_EXTENSION_DEP(libevent, sockets, true)
+diff --git a/nsq.c b/nsq.c
+index df15306..ef0af68 100644
+--- a/nsq.c
++++ b/nsq.c
+@@ -37,6 +37,9 @@
+ #include "nsq_lookupd.h"
+ #include "zend_exceptions.h"
+
++#ifdef HAVE_SYS_WAIT_H
++#include "sys/wait.h"
++#endif
+
+ /* If you declare any globals in php_nsq.h uncomment this:
+ ZEND_DECLARE_MODULE_GLOBALS(nsq)