Hello community,

here is the log from the commit of package php7-smbclient for openSUSE:Factory 
checked in at 2018-12-24 11:47:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/php7-smbclient (Old)
 and      /work/SRC/openSUSE:Factory/.php7-smbclient.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "php7-smbclient"

Mon Dec 24 11:47:14 2018 rev:2 rq:660555 version:0.9.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/php7-smbclient/php7-smbclient.changes    
2018-07-24 17:25:25.675532978 +0200
+++ /work/SRC/openSUSE:Factory/.php7-smbclient.new.28833/php7-smbclient.changes 
2018-12-24 11:47:15.817140589 +0100
@@ -1,0 +2,6 @@
+Thu Dec 20 16:48:09 UTC 2018 - jweberho...@weberhofer.at
+
+- Added php7-smbclient-fix_for_PHP_7.3.patch to allow building with PHP 7.3
+  as discussed in gh#eduardok/libsmbclient-php#60
+
+-------------------------------------------------------------------

New:
----
  php7-smbclient-fix_for_PHP_7.3.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ php7-smbclient.spec ++++++
--- /var/tmp/diff_new_pack.upQyke/_old  2018-12-24 11:47:16.189140263 +0100
+++ /var/tmp/diff_new_pack.upQyke/_new  2018-12-24 11:47:16.193140259 +0100
@@ -25,6 +25,8 @@
 Group:          Productivity/Networking/Web/Servers
 URL:            http://pecl.php.net/package/smbclient
 Source:         http://pecl.php.net/get/%{pkg_name}-%{version}.tgz
+# PATCH-FIX-UPSTREAM php7-smbclient-fix_for_PHP_7.3.patch -- fix to allow 
building for PHP 7.3
+Patch0:         php7-smbclient-fix_for_PHP_7.3.patch
 BuildRequires:  php7-devel >= 7.0
 BuildRequires:  pkgconfig
 BuildRequires:  pkgconfig(smbclient)
@@ -39,6 +41,7 @@
 
 %prep
 %setup -q -n %{pkg_name}-%{version}
+%patch0 -p1
 
 %build
 export CFLAGS="%{optflags} -fvisibility=hidden"

++++++ php7-smbclient-fix_for_PHP_7.3.patch ++++++
>From 596eaa47642633a4dc80f26f6bfbd95b536e57d1 Mon Sep 17 00:00:00 2001
From: Remi Collet <r...@remirepo.net>
Date: Wed, 27 Jun 2018 13:22:09 +0200
Subject: [PATCH] fix for PHP 7.3 because of API change, and array_init always
 succeeds

---
 smbclient.c | 30 ++++++------------------------
 1 file changed, 6 insertions(+), 24 deletions(-)

diff --git a/smbclient.c b/smbclient.c
index b110c06..81ebd5a 100644
--- a/smbclient.c
+++ b/smbclient.c
@@ -889,10 +889,7 @@ PHP_FUNCTION(smbclient_readdir)
                }
                RETURN_FALSE;
        }
-       if (array_init(return_value) != SUCCESS) {
-               php_error(E_WARNING, "Couldn't initialize array");
-               RETURN_FALSE;
-       }
+       array_init(return_value);
 #if PHP_MAJOR_VERSION >= 7
        add_assoc_string(return_value, "type", 
type_to_string(dirent->smbc_type));
        add_assoc_stringl(return_value, "comment", dirent->comment, 
dirent->commentlen);
@@ -1108,10 +1105,7 @@ PHP_FUNCTION(smbclient_stat)
                }
                RETURN_FALSE;
        }
-       if (array_init(return_value) != SUCCESS) {
-               php_error(E_WARNING, "Couldn't initialize array");
-               RETURN_FALSE;
-       }
+       array_init(return_value);
        add_index_long(return_value, 0, statbuf.st_dev);
        add_index_long(return_value, 1, statbuf.st_ino);
        add_index_long(return_value, 2, statbuf.st_mode);
@@ -1170,10 +1164,7 @@ PHP_FUNCTION(smbclient_fstat)
                }
                RETURN_FALSE;
        }
-       if (array_init(return_value) != SUCCESS) {
-               php_error(E_WARNING, "Couldn't initialize array");
-               RETURN_FALSE;
-       }
+       array_init(return_value);
        add_index_long(return_value, 0, statbuf.st_dev);
        add_index_long(return_value, 1, statbuf.st_ino);
        add_index_long(return_value, 2, statbuf.st_mode);
@@ -1608,10 +1599,7 @@ PHP_FUNCTION(smbclient_listxattr)
         * Because this list is static, we can get away with using a fixed
         * buffer size.*/
        if (smbc_listxattr(state->ctx, url, values, sizeof(values)) >= 0) {
-               if (array_init(return_value) != SUCCESS) {
-                       php_error(E_WARNING, "Couldn't initialize array");
-                       RETURN_FALSE;
-               }
+               array_init(return_value);
                /* Each attribute is null-separated, the list itself terminates
                 * with an empty element (i.e. two null bytes in a row). */
                for (s = c = values; c < values + sizeof(values); c++) {
@@ -1986,10 +1974,7 @@ PHP_FUNCTION(smbclient_statvfs)
                }
                RETURN_FALSE;
        }
-       if (array_init(return_value) != SUCCESS) {
-               php_error(E_WARNING, "Couldn't initialize array");
-               RETURN_FALSE;
-       }
+       array_init(return_value);
        add_assoc_long(return_value, "bsize",   st.f_bsize);
        add_assoc_long(return_value, "frsize",  st.f_frsize);
        add_assoc_long(return_value, "blocks",  st.f_blocks);
@@ -2031,10 +2016,7 @@ PHP_FUNCTION(smbclient_fstatvfs)
                }
                RETURN_FALSE;
        }
-       if (array_init(return_value) != SUCCESS) {
-               php_error(E_WARNING, "Couldn't initialize array");
-               RETURN_FALSE;
-       }
+       array_init(return_value);
        add_assoc_long(return_value, "bsize",   st.f_bsize);
        add_assoc_long(return_value, "frsize",  st.f_frsize);
        add_assoc_long(return_value, "blocks",  st.f_blocks);

Reply via email to