|
|
301e9f9 |
From 9ff3c987291dba1e4904672a9ca22e9b38739384 Mon Sep 17 00:00:00 2001
|
|
|
301e9f9 |
From: Po-Chuan Hsieh <sunpoet@sunpoet.net>
|
|
|
301e9f9 |
Date: Wed, 6 Sep 2023 00:46:57 +0800
|
|
|
301e9f9 |
Subject: [PATCH] Fix build warning on i386
|
|
|
301e9f9 |
|
|
|
301e9f9 |
/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]
|
|
|
301e9f9 |
php_error(E_WARNING, "Negative byte count: %ld", count);
|
|
|
301e9f9 |
~~~ ^~~~~
|
|
|
301e9f9 |
%d
|
|
|
301e9f9 |
/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]
|
|
|
301e9f9 |
php_error(E_WARNING, "Negative byte count: %ld", count);
|
|
|
301e9f9 |
~~~ ^~~~~
|
|
|
301e9f9 |
%d
|
|
|
301e9f9 |
2 warnings generated.
|
|
|
301e9f9 |
---
|
|
|
301e9f9 |
smbclient.c | 4 ++--
|
|
|
301e9f9 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
301e9f9 |
|
|
|
301e9f9 |
diff --git a/smbclient.c b/smbclient.c
|
|
|
301e9f9 |
index ad1f3d8..8a24dab 100644
|
|
|
301e9f9 |
--- a/smbclient.c
|
|
|
301e9f9 |
+++ b/smbclient.c
|
|
|
301e9f9 |
@@ -1202,7 +1202,7 @@ PHP_FUNCTION(smbclient_read)
|
|
|
301e9f9 |
return;
|
|
|
301e9f9 |
}
|
|
|
301e9f9 |
if (count < 0) {
|
|
|
301e9f9 |
- php_error(E_WARNING, "Negative byte count: %ld", count);
|
|
|
301e9f9 |
+ php_error(E_WARNING, "Negative byte count: " ZEND_LONG_FMT, count);
|
|
|
301e9f9 |
RETURN_FALSE;
|
|
|
301e9f9 |
}
|
|
|
301e9f9 |
STATE_FROM_ZSTATE;
|
|
|
301e9f9 |
@@ -1253,7 +1253,7 @@ PHP_FUNCTION(smbclient_write)
|
|
|
301e9f9 |
return;
|
|
|
301e9f9 |
}
|
|
|
301e9f9 |
if (count < 0) {
|
|
|
301e9f9 |
- php_error(E_WARNING, "Negative byte count: %ld", count);
|
|
|
301e9f9 |
+ php_error(E_WARNING, "Negative byte count: " ZEND_LONG_FMT, count);
|
|
|
301e9f9 |
RETURN_FALSE;
|
|
|
301e9f9 |
}
|
|
|
301e9f9 |
if (count == 0 || count > str_len) {
|
|
|
301e9f9 |
From 43f9e8e3ee234e51390adbcc8f42ab0271930702 Mon Sep 17 00:00:00 2001
|
|
|
301e9f9 |
From: Po-Chuan Hsieh <sunpoet@sunpoet.net>
|
|
|
301e9f9 |
Date: Wed, 6 Sep 2023 00:45:40 +0800
|
|
|
301e9f9 |
Subject: [PATCH] Fix build with Clang 16 on i386
|
|
|
301e9f9 |
|
|
|
301e9f9 |
/wrkdirs/usr/ports/net/pecl-smbclient/work-php80/smbclient-1.1.1/smb_streams.c:328:2: error: incompatible function pointer types initializing 'int (*)(php_stream *, zend_off_t, int, zend_off_t *)' (aka 'int (*)(struct _php_stream *, int, int, int *)') with an expression of type 'int (php_stream *, off_t, int, off_t *)' (aka 'int (struct _php_stream *, long long, int, long long *)') [-Wincompatible-function-pointer-types]
|
|
|
301e9f9 |
php_smb_ops_seek,
|
|
|
301e9f9 |
^~~~~~~~~~~~~~~~
|
|
|
301e9f9 |
1 error generated.
|
|
|
301e9f9 |
---
|
|
|
301e9f9 |
smb_streams.c | 2 +-
|
|
|
301e9f9 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
301e9f9 |
|
|
|
301e9f9 |
diff --git a/smb_streams.c b/smb_streams.c
|
|
|
301e9f9 |
index 8b2a9ab..51a0a32 100644
|
|
|
301e9f9 |
--- a/smb_streams.c
|
|
|
301e9f9 |
+++ b/smb_streams.c
|
|
|
301e9f9 |
@@ -270,7 +270,7 @@ static int php_smb_ops_stat(php_stream *stream, php_stream_statbuf *ssb TSRMLS_D
|
|
|
301e9f9 |
return 0;
|
|
|
301e9f9 |
}
|
|
|
301e9f9 |
|
|
|
301e9f9 |
-static int php_smb_ops_seek(php_stream *stream, off_t offset, int whence, off_t *newoffset TSRMLS_DC)
|
|
|
301e9f9 |
+static int php_smb_ops_seek(php_stream *stream, zend_off_t offset, int whence, zend_off_t *newoffset TSRMLS_DC)
|
|
|
301e9f9 |
{
|
|
|
301e9f9 |
STREAM_DATA_FROM_STREAM();
|
|
|
301e9f9 |
|