[packages/protobuf] - restore x32 patch
baggins
baggins at pld-linux.org
Sun Sep 21 13:57:13 CEST 2025
commit f804ffad7fc872c0e8bed1280944ccc88c1d2323
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Sep 21 15:57:02 2025 +0200
- restore x32 patch
protobuf-x32.patch | 12 ++++++------
protobuf.spec | 2 ++
2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/protobuf.spec b/protobuf.spec
index 41f4604..d42c7a8 100644
--- a/protobuf.spec
+++ b/protobuf.spec
@@ -22,6 +22,7 @@ Source0: https://github.com/google/protobuf/archive/v%{version}/%{name}-%{versio
Source1: ftdetect-proto.vim
Patch0: python-no-broken-tests.patch
Patch1: no-utf8_range-pkgconfig.patch
+Patch2: protobuf-x32.patch
URL: https://github.com/google/protobuf/
BuildRequires: abseil-cpp-devel >= 20250814.0
%{?with_tests:BuildRequires: gmock-devel >= 1.9.0}
@@ -202,6 +203,7 @@ buforów protokołowych (Protocol Buffers).
%setup -q
%patch -P0 -p1
%patch -P1 -p1
+%patch -P2 -p1
%{__sed} -i -e '1s,/usr/bin/env python$,%{__python3},' \
examples/add_person.py \
diff --git a/protobuf-x32.patch b/protobuf-x32.patch
index ffb594d..5217d47 100644
--- a/protobuf-x32.patch
+++ b/protobuf-x32.patch
@@ -3,11 +3,11 @@ Bucket selection is based on higher 32 bits of seed, which is 64-bit wide only o
--- protobuf-3.20.3/src/google/protobuf/map.h.orig 2022-09-29 23:09:51.000000000 +0200
+++ protobuf-3.20.3/src/google/protobuf/map.h 2024-09-02 21:38:14.893943033 +0200
@@ -1092,7 +1092,7 @@ class Map {
- // Use a commpage-based fast time function on Apple environments (MacOS,
- // iOS, tvOS, watchOS, etc).
- s += mach_absolute_time();
+ // Use a commpage-based fast time function on Apple environments (MacOS,
+ // iOS, tvOS, watchOS, etc).
+ s = clock_gettime_nsec_np(CLOCK_UPTIME_RAW);
-#elif defined(__x86_64__) && defined(__GNUC__)
+#elif defined(__x86_64__) && defined(__LP64__) && defined(__GNUC__)
- uint32_t hi, lo;
- asm volatile("rdtsc" : "=a"(lo), "=d"(hi));
- s += ((static_cast<uint64_t>(hi) << 32) | lo);
+ uint32_t hi, lo;
+ asm volatile("rdtsc" : "=a"(lo), "=d"(hi));
+ s += ((static_cast<uint64_t>(hi) << 32) | lo);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/protobuf.git/commitdiff/f804ffad7fc872c0e8bed1280944ccc88c1d2323
More information about the pld-cvs-commit
mailing list