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.
This commit is contained in:
Po-Chuan Hsieh 2023-09-06 04:41:20 +08:00
parent 77d4018e3e
commit 983d161bf1
No known key found for this signature in database
GPG Key ID: 9A4BD10F002DD04B
1 changed files with 20 additions and 0 deletions

View File

@ -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) {