git: cd759f83ef4b - main - databases/mongodb[78]0: improve a patch

From: Ronald Klop <ronald_at_FreeBSD.org>
Date: Sat, 30 Aug 2025 18:20:33 UTC
The branch main has been updated by ronald:

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

commit cd759f83ef4b4353dbdc97fa0d7ea2ccce6c48c8
Author:     Ronald Klop <ronald@FreeBSD.org>
AuthorDate: 2025-08-29 11:59:20 +0000
Commit:     Ronald Klop <ronald@FreeBSD.org>
CommitDate: 2025-08-30 18:20:05 +0000

    databases/mongodb[78]0: improve a patch
    
    Be pedantic that '!= 0' is not the same as '== -1'. And indeed -1 is what
    is documented in the man page of _umtx_op to indicate an error.
    
    No functional change expected.
    
    Reported by:    https://github.com/mongodb/mongo/pull/1607#pullrequestreview-2677292316
---
 databases/mongodb70/Makefile                                            | 2 +-
 databases/mongodb70/files/patch-src_mongo_platform_waitable__atomic.cpp | 2 +-
 databases/mongodb80/Makefile                                            | 1 +
 databases/mongodb80/files/patch-src_mongo_platform_waitable__atomic.cpp | 2 +-
 4 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/databases/mongodb70/Makefile b/databases/mongodb70/Makefile
index b683165b6d63..3c730b15a992 100644
--- a/databases/mongodb70/Makefile
+++ b/databases/mongodb70/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	mongodb
 DISTVERSIONPREFIX=	r
 DISTVERSION=	7.0.23
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	databases net
 PKGNAMESUFFIX=	${DISTVERSION:R:S/.//}
 
diff --git a/databases/mongodb70/files/patch-src_mongo_platform_waitable__atomic.cpp b/databases/mongodb70/files/patch-src_mongo_platform_waitable__atomic.cpp
index 6f1b397699a3..73e0befd876d 100644
--- a/databases/mongodb70/files/patch-src_mongo_platform_waitable__atomic.cpp
+++ b/databases/mongodb70/files/patch-src_mongo_platform_waitable__atomic.cpp
@@ -52,7 +52,7 @@
 +    }
 +
 +    int umtxOpRet;
-+    if ((umtxOpRet = _umtx_op(const_cast<void*>(uaddr), UMTX_OP_WAIT_UINT_PRIVATE, old, (void*)sizeof(struct _umtx_time), uaddr2)) != 0) {
++    if ((umtxOpRet = _umtx_op(const_cast<void*>(uaddr), UMTX_OP_WAIT_UINT_PRIVATE, old, (void*)sizeof(struct _umtx_time), uaddr2)) == -1) {
 +        if (errno == ETIMEDOUT) {
 +            return false;
 +        }
diff --git a/databases/mongodb80/Makefile b/databases/mongodb80/Makefile
index 9ec9b060287f..1e2f15357e72 100644
--- a/databases/mongodb80/Makefile
+++ b/databases/mongodb80/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	mongodb
 DISTVERSIONPREFIX=	r
 DISTVERSION=	8.0.12
+PORTREVISION=	1
 CATEGORIES=	databases net
 PKGNAMESUFFIX=	${DISTVERSION:R:S/.//}
 
diff --git a/databases/mongodb80/files/patch-src_mongo_platform_waitable__atomic.cpp b/databases/mongodb80/files/patch-src_mongo_platform_waitable__atomic.cpp
index 6f1b397699a3..73e0befd876d 100644
--- a/databases/mongodb80/files/patch-src_mongo_platform_waitable__atomic.cpp
+++ b/databases/mongodb80/files/patch-src_mongo_platform_waitable__atomic.cpp
@@ -52,7 +52,7 @@
 +    }
 +
 +    int umtxOpRet;
-+    if ((umtxOpRet = _umtx_op(const_cast<void*>(uaddr), UMTX_OP_WAIT_UINT_PRIVATE, old, (void*)sizeof(struct _umtx_time), uaddr2)) != 0) {
++    if ((umtxOpRet = _umtx_op(const_cast<void*>(uaddr), UMTX_OP_WAIT_UINT_PRIVATE, old, (void*)sizeof(struct _umtx_time), uaddr2)) == -1) {
 +        if (errno == ETIMEDOUT) {
 +            return false;
 +        }