bug-wget
[Top][All Lists]
Advanced

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

[Bug-wget] PATCH: Fix FTBFS on GNU/Hurd


From: Svante Signell
Subject: [Bug-wget] PATCH: Fix FTBFS on GNU/Hurd
Date: Fri, 10 Mar 2017 14:20:56 +0100

Hello,

wget currently does not build from source on GNU/Hurd since Debian version 1.18-
4. This is due to that HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER is not defined
by configure and then assumes that the function pthread_rwlockattr_setkind_np()
is available. On GNU/Hurd it is not. The Hurd libpthread is built from the
sources in glibc/libpthread/*, not in glibc/nptl.

The attached patch fixes the build problems by conditioning on __GNU__ which is
unique for GNU/Hurd. However, a better solution would probably be to detect if
the function pthread_rwlockattr_setkind_np() is available in configure.ac or
m4/*.m4 or check if TPS+SCHED_FIFO/SCHED_RR is supported by
pthread_rwlock_rdlock(), see below.

As written in the comments of m4/pthread_rwlock_rdlock.m4 POSIX-2008 only
requires this for specific implementations:

dnl POSIX:2008 makes this requirement only for implementations that support TPS
dnl (Thread Priority Scheduling) and only for the scheduling policies SCHED_FIFO
dnl and SCHED_RR, see
dnl http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_rwlock_rdl
ock.html
dnl but test verifies the guarantee regardless of TPS and regardless of
dnl scheduling policy.

Thank you for your attention.

Attachment: lib_glthread_lock.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]