git: 7cf084043b4f - 2023Q3 - databases/rocksdb: Fix build on i386

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Wed, 06 Sep 2023 20:01:40 UTC
The branch 2023Q3 has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7cf084043b4f86c9bff67a979b89000197df1993

commit 7cf084043b4f86c9bff67a979b89000197df1993
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-09-05 02:10:12 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-09-06 20:01:22 +0000

    databases/rocksdb: Fix build on i386
    
    utilities/transactions/pessimistic_transaction.cc:691:25: error: implicit conversion from 'type' (aka 'unsigned long long') to 'size_t' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295 [-Werror,-Wconstant-conversion]
                          : std::numeric_limits<uint64_t>::max();
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    utilities/transactions/pessimistic_transaction.cc:766:23: error: implicit conversion from 'type' (aka 'unsigned long long') to 'size_t' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295 [-Werror,-Wconstant-conversion]
                        : std::numeric_limits<uint64_t>::max();
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    2 errors generated.
    
    (cherry picked from commit dffdaab0c8a9fadd083d0d6967231c97fb1ad053)
---
 ...utilities-transactions-pessimistic_transaction.cc | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/databases/rocksdb/files/patch-utilities-transactions-pessimistic_transaction.cc b/databases/rocksdb/files/patch-utilities-transactions-pessimistic_transaction.cc
new file mode 100644
index 000000000000..1eb9de9bfafc
--- /dev/null
+++ b/databases/rocksdb/files/patch-utilities-transactions-pessimistic_transaction.cc
@@ -0,0 +1,20 @@
+--- utilities/transactions/pessimistic_transaction.cc.orig	2023-09-01 20:58:39 UTC
++++ utilities/transactions/pessimistic_transaction.cc
+@@ -688,7 +688,7 @@ Status WriteCommittedTxn::CommitWithoutPrepareInternal
+           const Comparator* ucmp =
+               WriteBatchWithIndexInternal::GetUserComparator(*wbwi, cf);
+           return ucmp ? ucmp->timestamp_size()
+-                      : std::numeric_limits<uint64_t>::max();
++                      : std::numeric_limits<size_t>::max();
+         });
+     if (!s.ok()) {
+       return s;
+@@ -763,7 +763,7 @@ Status WriteCommittedTxn::CommitInternal() {
+         const Comparator* ucmp =
+             WriteBatchWithIndexInternal::GetUserComparator(*wbwi, cf);
+         return ucmp ? ucmp->timestamp_size()
+-                    : std::numeric_limits<uint64_t>::max();
++                    : std::numeric_limits<size_t>::max();
+       });
+     }
+   }