Re: [PATCH] Guard non-portable PTHREAD_RWLOCK_PREFER_WRITER_NP in FXReadWriteLock.cpp
JVZ <[email protected]> Sat, 1 Aug 2026 16:41:57 -0500
| Newsgroups | gmane.comp.lib.fox-toolkit.user |
|---|---|
| Organization | FOX-Toolkit |
| Message-ID | <20260801164157.03be09cc@resurgam> |
On Fri, 31 Jul 2026 23:53:48 +0200 Cord Beermann <[email protected]> wrote: >Hello, > >I'm the Debian Maintainer for the gogglesmm-project that uses the Fox-Toolkit >(https://github.com/gogglesmm/gogglesmm) > >When compiling FOX Toolkit on platforms without the non-standard GNU extension >PTHREAD_RWLOCK_PREFER_WRITER_NP (such as GNU/Hurd), the build fails in >FXReadWriteLock.cpp. > >Guarding pthread_rwlockattr_setkind_np() with #ifdef >PTHREAD_RWLOCK_PREFER_WRITER_NP resolves the build failure on non-glibc/Hurd >platforms while preserving the behavior on systems that support it. > >Please consider applying the attached patch: > >--- a/lib/FXReadWriteLock.cpp >+++ b/lib/FXReadWriteLock.cpp >@@ -72,7 +72,9 @@ FXReadWriteLock::FXReadWriteLock(){ > FXSTATIC_ASSERT(sizeof(data)>=sizeof(pthread_rwlock_t)); > pthread_rwlockattr_t rwlockatt; > pthread_rwlockattr_init(&rwlockatt); >+#ifdef PTHREAD_RWLOCK_PREFER_WRITER_NP > pthread_rwlockattr_setkind_np(&rwlockatt,PTHREAD_RWLOCK_PREFER_WRITER_NP); >+#endif > pthread_rwlock_init((pthread_rwlock_t*)data,&rwlockatt); > pthread_rwlockattr_destroy(&rwlockatt); > #else > >Thank you, > Cord > >PS: I'll file the same report to the Author of gogglesmm.--> https://github.com/gogglesmm/gogglesmm/pull/129 Thanks, I've got that patch added!! -- JVZ -- +----------------------------------------------------------------------------+ | Copyright (C) 16:40 08/ 1/2026 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+