git: 983d161bf1c9 - main - net/pecl-smbclient: Fix build warning on i386

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Tue, 05 Sep 2023 20:46:48 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=983d161bf1c94e170309c108335b1ab50d260f76

commit 983d161bf1c94e170309c108335b1ab50d260f76
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-09-05 20:41:20 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-09-05 20:46:28 +0000

    net/pecl-smbclient: Fix build warning on i386
    
    /wrkdirs/usr/ports/net/pecl-smbclient/work-php81/smbclient-1.1.1/smbclient.c:1205:52: warning: format specifies type 'long' but the argument has type 'zend_long' (aka 'int') [-Wformat]
                    php_error(E_WARNING, "Negative byte count: %ld", count);
                                                               ~~~   ^~~~~
                                                               %d
    /wrkdirs/usr/ports/net/pecl-smbclient/work-php81/smbclient-1.1.1/smbclient.c:1256:52: warning: format specifies type 'long' but the argument has type 'zend_long' (aka 'int') [-Wformat]
                    php_error(E_WARNING, "Negative byte count: %ld", count);
                                                               ~~~   ^~~~~
                                                               %d
    2 warnings generated.
---
 net/pecl-smbclient/files/patch-smbclient.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/net/pecl-smbclient/files/patch-smbclient.c b/net/pecl-smbclient/files/patch-smbclient.c
new file mode 100644
index 000000000000..925dcb108078
--- /dev/null
+++ b/net/pecl-smbclient/files/patch-smbclient.c
@@ -0,0 +1,20 @@
+--- smbclient.c.orig	2023-04-17 03:27:10 UTC
++++ smbclient.c
+@@ -1202,7 +1202,7 @@ PHP_FUNCTION(smbclient_read)
+ 		return;
+ 	}
+ 	if (count < 0) {
+-		php_error(E_WARNING, "Negative byte count: %ld", count);
++		php_error(E_WARNING, "Negative byte count: " ZEND_LONG_FMT, count);
+ 		RETURN_FALSE;
+ 	}
+ 	STATE_FROM_ZSTATE;
+@@ -1253,7 +1253,7 @@ PHP_FUNCTION(smbclient_write)
+ 		return;
+ 	}
+ 	if (count < 0) {
+-		php_error(E_WARNING, "Negative byte count: %ld", count);
++		php_error(E_WARNING, "Negative byte count: " ZEND_LONG_FMT, count);
+ 		RETURN_FALSE;
+ 	}
+ 	if (count == 0 || count > str_len) {