<pre style='margin:0'>
Ryan Carsten Schmidt (ryandesign) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/88dac4e7d52cc5c8f26f4ef64fe84a8d99b26979">https://github.com/macports/macports-ports/commit/88dac4e7d52cc5c8f26f4ef64fe84a8d99b26979</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 88dac4e7d52 mongo-c-driver: fix build for old systems
</span>88dac4e7d52 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 88dac4e7d52cc5c8f26f4ef64fe84a8d99b26979
</span>Author: Sergey Fedorov <barracuda@macos-powerpc.org>
AuthorDate: Mon Sep 16 09:10:26 2024 +0800
<span style='display:block; white-space:pre;color:#404040;'> mongo-c-driver: fix build for old systems
</span>---
devel/mongo-c-driver/Portfile | 7 ++++
.../mongo-c-driver/files/pthread_threadid_np.patch | 39 ++++++++++++++++++++++
2 files changed, 46 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/mongo-c-driver/Portfile b/devel/mongo-c-driver/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 96b0f63900b..3209b2ae784 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/mongo-c-driver/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/mongo-c-driver/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -55,6 +55,13 @@ if {${subport} eq ${name}} {
</span> port:snappy \
port:zlib
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # bson-dsl.h: error: thread-local storage not supported for this target
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compiler.thread_local_storage yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # mongoc-log.c: error: implicit declaration of function 'pthread_threadid_np'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pthread_threadid_np.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> configure.args-append \
-DENABLE_ICU=ON \
-DENABLE_MONGOC=ON \
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/mongo-c-driver/files/pthread_threadid_np.patch b/devel/mongo-c-driver/files/pthread_threadid_np.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..c9b42926418
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/mongo-c-driver/files/pthread_threadid_np.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,39 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 3b5602453a6104a24ff33d5c384c6b7fa416d8b2 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Sergey Fedorov <barracuda@macos-powerpc.org>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Mon, 16 Sep 2024 08:51:28 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] mongoc-log.c: fix build for macOS without pthread_threadid_np
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/libmongoc/src/mongoc/mongoc-log.c | 11 +++++++++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 11 insertions(+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/libmongoc/src/mongoc/mongoc-log.c src/libmongoc/src/mongoc/mongoc-log.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 2ea2c35bb..a04fc4d4d 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/libmongoc/src/mongoc/mongoc-log.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/libmongoc/src/mongoc/mongoc-log.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -21,6 +21,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <process.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #elif defined(__APPLE__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <pthread.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <AvailabilityMacros.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #elif defined(__FreeBSD__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <sys/thr.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #elif defined(__NetBSD__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -198,7 +199,17 @@ mongoc_log_default_handler (mongoc_log_level_t log_level, const char *log_domain
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pid = (int) _lwp_self ();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #elif defined(__APPLE__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ uint64_t tid;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060 || defined(__ppc__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ tid = pthread_mach_thread_np(pthread_self());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif MAC_OS_X_VERSION_MIN_REQUIRED < 1060
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (&pthread_threadid_np != NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pthread_threadid_np (0, &tid);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ tid = pthread_mach_thread_np(pthread_self());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pthread_threadid_np (0, &tid);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pid = (int) tid;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pid = (int) getpid ();
</span></pre><pre style='margin:0'>
</pre>