diff options
author | Ronald Klop <ronald@FreeBSD.org> | 2025-08-29 13:59:20 +0200 |
---|---|---|
committer | Ronald Klop <ronald@FreeBSD.org> | 2025-08-30 20:20:05 +0200 |
commit | cd759f83ef4b4353dbdc97fa0d7ea2ccce6c48c8 (patch) | |
tree | d3acb1ddac2c2f93db300608867826d698b84efc | |
parent | databases/mongodb70: fix build with python 3.12 (diff) |
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
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; + } |