From c59324125872e1eb5c267826663df23eed168fa6 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 14 Feb 2015 11:24:21 +0100 Subject: php-pecl-varnish: 1.2.0 (test build, waiting for 1.2.1) --- varnish-upstream.patch | 101 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 varnish-upstream.patch (limited to 'varnish-upstream.patch') diff --git a/varnish-upstream.patch b/varnish-upstream.patch new file mode 100644 index 0000000..e146a54 --- /dev/null +++ b/varnish-upstream.patch @@ -0,0 +1,101 @@ +--- pecl/varnish/trunk/varnish_lib.c 2015/02/13 21:33:27 335940 ++++ pecl/varnish/trunk/varnish_lib.c 2015/02/14 09:42:22 335941 +@@ -812,6 +812,13 @@ + return 0; + }/*}}}*/ + ++#if HAVE_VARNISHAPILIB >= 4 ++int ++php_varnish_snap_stats(zval *storage, const char *ident TSRMLS_DC) ++{/*{{{*/ ++ return 0; ++}/*}}}*/ ++#else + int + php_varnish_snap_stats(zval *storage, const char *ident TSRMLS_DC) + {/*{{{*/ +@@ -832,25 +839,21 @@ + return 0; + } + +-#if HAVE_VARNISHAPILIB >= 4 +- /* XXX use VSM_fantom */ +- vcm = VSC_Main(vd, NULL); +- +- return !VSC_Iter(vd, NULL, php_varnish_snap_stats_cb, storage); +-#else + vcm = VSC_Main(vd); + + return !VSC_Iter(vd, php_varnish_snap_stats_cb, storage); +-#endif + }/*}}}*/ ++#endif + +-#if HAVE_VARNISHAPILIB >=4 ++#if HAVE_VARNISHAPILIB >= 4 + int +-php_varnish_get_log(const struct VSL_data *vd, zval *line TSRMLS_DC) ++php_varnish_get_log(const struct VSM_data *vd, zval *line TSRMLS_DC) ++{/*{{{*/ ++ return 0; ++}/*}}}*/ + #else + int + php_varnish_get_log(const struct VSM_data *vd, zval *line TSRMLS_DC) +-#endif + {/*{{{*/ + uint32_t *p; + int i; +@@ -880,6 +883,7 @@ + + }/*}}}*/ + #endif ++#endif + + int + php_varnish_is_running(int sock, int *status, int tmo TSRMLS_DC) +--- pecl/varnish/trunk/varnish_lib.h 2015/02/13 21:33:27 335940 ++++ pecl/varnish/trunk/varnish_lib.h 2015/02/14 09:42:22 335941 +@@ -96,13 +96,8 @@ + php_varnish_clear_panic(int sock, int *status, int tmo TSRMLS_DC); + + #ifndef PHP_WIN32 +-#if HAVE_VARNISHAPILIB >=4 +-int +-php_varnish_get_log(const struct VSL_data *vd, zval *line TSRMLS_DC); +-#else + int + php_varnish_get_log(const struct VSM_data *vd, zval *line TSRMLS_DC); +-#endif + + void + php_varnish_log_get_tag_name(int index, char **ret, int *ret_len TSRMLS_DC); +--- pecl/varnish/trunk/varnish_lib.c 2015/02/14 09:42:22 335941 ++++ pecl/varnish/trunk/varnish_lib.c 2015/02/14 10:05:43 335942 +@@ -777,6 +777,7 @@ + }/*}}}*/ + + #ifndef PHP_WIN32 ++#if HAVE_VARNISHAPILIB < 4 + static int + php_varnish_snap_stats_cb(void *priv, const struct VSC_point const *pt) + {/*{{{*/ +@@ -811,6 +812,7 @@ + + return 0; + }/*}}}*/ ++#endif + + #if HAVE_VARNISHAPILIB >= 4 + int +--- pecl/varnish/trunk/varnish_lib.c 2015/02/14 10:05:43 335942 ++++ pecl/varnish/trunk/varnish_lib.c 2015/02/14 10:15:29 335943 +@@ -350,8 +350,6 @@ + char *t_arg, *t_start, *p, tmp_addr[41]; + #if HAVE_VARNISHAPILIB >= 4 + struct VSM_fantom vt; +-#else +- char *p; + #endif + + vsd = VSM_New(); -- cgit