pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

libresprite: add a patch for working around pthread issues



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <wiz%NetBSD.org@localhost>
Pushed By:	wiz
Date:		Sat Mar 21 13:38:55 2026 +0100
Changeset:	73f2fbeddacd92909b093f142f484f928b936182

Modified Files:
	libresprite/distinfo
Added Files:
	libresprite/patches/patch-src_base_mutex__pthread.h

Log Message:
libresprite: add a patch for working around pthread issues

Still needs ctype fixes

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=73f2fbeddacd92909b093f142f484f928b936182

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 libresprite/distinfo                               |  1 +
 .../patches/patch-src_base_mutex__pthread.h        | 30 ++++++++++++++++++++++
 2 files changed, 31 insertions(+)

diffs:
diff --git a/libresprite/distinfo b/libresprite/distinfo
index c91f75cdda..9bf3ea5fce 100644
--- a/libresprite/distinfo
+++ b/libresprite/distinfo
@@ -3,4 +3,5 @@ $NetBSD$
 BLAKE2s (LibreSprite/SOURCE.CODE.+.submodules.tar.gz) = c80b79c173a5a090b3cd2e483cc0cdd8a594869fc4f7d00fdf5411ab951f418d
 SHA512 (LibreSprite/SOURCE.CODE.+.submodules.tar.gz) = 6f79423a98b931e7538acd4d0362ce09890bc6f8877b2a4d77a217ac8bd1fc9f24220eba40203c83bfab504e9bcd1510c4fbea065d63587078596ecaad513f6e
 Size (LibreSprite/SOURCE.CODE.+.submodules.tar.gz) = 15228038 bytes
+SHA1 (patch-src_base_mutex__pthread.h) = 4e9261476a24ae7dbbee4853992c43d597899fc5
 SHA1 (patch-src_she_sdl2_she.cpp) = 6a94a2e38d06417bade20939e437410d473c5047
diff --git a/libresprite/patches/patch-src_base_mutex__pthread.h b/libresprite/patches/patch-src_base_mutex__pthread.h
new file mode 100644
index 0000000000..02af17d3c5
--- /dev/null
+++ b/libresprite/patches/patch-src_base_mutex__pthread.h
@@ -0,0 +1,30 @@
+$NetBSD$
+
+Workaround for core dumps, from
+https://github.com/LibreSprite/LibreSprite/issues/542
+
+--- src/base/mutex_pthread.h.orig	2026-03-21 12:34:03.269850267 +0000
++++ src/base/mutex_pthread.h
+@@ -13,11 +13,14 @@ class base::mutex::mutex_impl { (public)
+ public:
+ 
+   mutex_impl() {
+-    pthread_mutex_init(&m_handle, NULL);
++    pthread_mutexattr_init(&m_attr);
++    pthread_mutexattr_settype(&m_attr, PTHREAD_MUTEX_ERRORCHECK);
++    pthread_mutex_init(&m_handle, &m_attr);
+   }
+ 
+   ~mutex_impl() {
+     pthread_mutex_destroy(&m_handle);
++    pthread_mutexattr_destroy(&m_attr);
+   }
+ 
+   void lock() {
+@@ -34,5 +37,6 @@ class base::mutex::mutex_impl { (public)
+ 
+ private:
+   pthread_mutex_t m_handle;
++  pthread_mutexattr_t m_attr;
+ 
+ };


Home | Main Index | Thread Index | Old Index