Source: nspr
Version: 4.28-1
Severity: 
Tags: ftbfs, patch
User: debian-h...@lists.debian.org
Usertags: hurd

Hello,

Currently libdrm FTBFS GNU/Hurd due to a parenthesis bug in ptsync.c.
Attached is a patch to fix this: nspr_pr_src_pthreads_ptsynch.c.diff.

Furthermore for the tests to succeed on GNU/Hurd the following patch:
debian_rules.diff, is needed, since GNU/Hurd does fully implement semaphores.

This package has built properly before, the latest built package is: 4.12-2

Thanks!
--- a/debian/rules	2020-09-20 17:11:23.000000000 +0200
+++ b/debian/rules	2020-09-20 18:26:34.000000000 +0200
@@ -84,7 +84,12 @@
 	# Skip socket because it freezes.
 	# Skip getproto because it fails on some buildds.
 	# Skip nblayer because it freezes on armel.
+ifneq (hurd,$(shell dpkg-architecture -qDEB_HOST_ARCH_OS))
 	cd nspr/pr/tests && grep -v '^\(fdcach\|gethost\|getproto\|nblayer\|peek\|socket\|vercheck\)$$' ./runtests.sh | sh - $(CURDIR)/nspr/dist
+else
+	# Skip semaphore tests: not implemented on GNU/Hurd.
+	cd nspr/pr/tests && grep -v  '^\(sema\|semaerr\|semaping\)' ./runtests.sh | sh -s - $(CURDIR)/nspr/dist
+endif
 	cd nspr/lib/tests && LD_LIBRARY_PATH=$(CURDIR)/nspr/dist/bin$(addprefix :,$(LD_LIBRARY_PATH)) ./base64t
 	cd nspr/lib/tests && LD_LIBRARY_PATH=$(CURDIR)/nspr/dist/bin$(addprefix :,$(LD_LIBRARY_PATH)) ./string
 endif
Index: nspr-4.28/nspr/pr/src/pthreads/ptsynch.c
===================================================================
--- nspr-4.28.orig/nspr/pr/src/pthreads/ptsynch.c
+++ nspr-4.28/nspr/pr/src/pthreads/ptsynch.c
@@ -50,7 +50,7 @@ void _PR_InitLocks(void)
     rv = _PT_PTHREAD_MUTEXATTR_INIT(&_pt_mattr);
     PR_ASSERT(0 == rv);
 
-#if (defined(LINUX) && (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) || \
+#if (defined(LINUX) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2))) || \
     (defined(FREEBSD) && __FreeBSD_version > 700055)
     rv = pthread_mutexattr_settype(&_pt_mattr, PTHREAD_MUTEX_ADAPTIVE_NP);
     PR_ASSERT(0 == rv);

Reply via email to