[packages/php-pecl-grpc] fix building on x32
baggins
baggins at pld-linux.org
Sun Jun 11 14:21:31 CEST 2023
commit 83f1eb48e1d16bca6d0784f2756cdca75404b295
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Jun 11 14:21:19 2023 +0200
fix building on x32
php-pecl-grpc.spec | 4 +++-
x32.patch | 25 +++++++++++++++++++++++++
2 files changed, 28 insertions(+), 1 deletion(-)
---
diff --git a/php-pecl-grpc.spec b/php-pecl-grpc.spec
index 8c2f916..f7a13a3 100644
--- a/php-pecl-grpc.spec
+++ b/php-pecl-grpc.spec
@@ -15,6 +15,7 @@ License: BSD
Group: Development/Languages/PHP
Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
# Source0-md5: 8c1912166e74799f2905fc1897e418b5
+Patch0: x32.patch
URL: http://pecl.php.net/package/grpc/
%{?with_tests:BuildRequires: %{php_name}-cli}
BuildRequires: %{php_name}-devel >= 4:5.5
@@ -37,7 +38,8 @@ clients and servers using any combination of the supported languages.
%prep
%setup -qc
-mv %{modname}-%{version}/* .
+%{__mv} %{modname}-%{version}/* .
+%patch0 -p1
%build
phpize
diff --git a/x32.patch b/x32.patch
new file mode 100644
index 0000000..ea8b391
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,25 @@
+--- php82-pecl-grpc-1.54.0/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/getrandom_fillin.h~ 2023-04-17 20:46:47.000000000 +0200
++++ php82-pecl-grpc-1.54.0/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/getrandom_fillin.h 2023-06-11 14:11:10.444771738 +0200
+@@ -23,7 +23,11 @@
+ #include <sys/syscall.h>
+
+ #if defined(OPENSSL_X86_64)
++#if defined(__ILP32__)
++#define EXPECTED_NR_getrandom (__X32_SYSCALL_BIT + 318)
++#else
+ #define EXPECTED_NR_getrandom 318
++#endif
+ #elif defined(OPENSSL_X86)
+ #define EXPECTED_NR_getrandom 355
+ #elif defined(OPENSSL_AARCH64)
+--- php82-pecl-grpc-1.54.0/src/core/lib/gpr/wrap_memcpy.cc~ 2023-04-17 20:46:47.000000000 +0200
++++ php82-pecl-grpc-1.54.0/src/core/lib/gpr/wrap_memcpy.cc 2023-06-11 14:19:36.499513469 +0200
+@@ -28,7 +28,7 @@
+
+ extern "C" {
+ #ifdef __linux__
+-#if defined(__x86_64__) && !defined(GPR_MUSL_LIBC_COMPAT) && \
++#if defined(__x86_64__) && !defined(__ILP32__) && !defined(GPR_MUSL_LIBC_COMPAT) && \
+ !defined(__ANDROID__)
+ __asm__(".symver memcpy,memcpy at GLIBC_2.2.5");
+ void* __wrap_memcpy(void* destination, const void* source, size_t num) {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-grpc.git/commitdiff/83f1eb48e1d16bca6d0784f2756cdca75404b295
More information about the pld-cvs-commit
mailing list