mirror of https://git.FreeBSD.org/ports.git
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
This commit is contained in:
parent
5e74cc0c0c
commit
cd759f83ef
|
@ -1,7 +1,7 @@
|
|||
PORTNAME= mongodb
|
||||
DISTVERSIONPREFIX= r
|
||||
DISTVERSION= 7.0.23
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= databases net
|
||||
PKGNAMESUFFIX= ${DISTVERSION:R:S/.//}
|
||||
|
||||
|
|
|
@ -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;
|
||||
+ }
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
PORTNAME= mongodb
|
||||
DISTVERSIONPREFIX= r
|
||||
DISTVERSION= 8.0.12
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= databases net
|
||||
PKGNAMESUFFIX= ${DISTVERSION:R:S/.//}
|
||||
|
||||
|
|
|
@ -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;
|
||||
+ }
|
||||
|
|
Loading…
Reference in New Issue