From: Gabriele Giacone <1o5g4r8o@gmail.com>
Date: Sat, 14 May 2022 00:33:03 +0800
Subject: Link against pthread on the Hurd, to work around bug #578432

Bug-Debian: http://bugs.debian.org/749095
---
 wscript | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/wscript b/wscript
index 5b5c42d..b33d1f8 100644
--- a/wscript
+++ b/wscript
@@ -188,6 +188,10 @@ def configure(conf):
             conf.env.HAVE_LMDB = True
 
 
+        # Work around pthread bug on the hurd (#578432)
+        if sys.platform.startswith("gnu"):
+            conf.ADD_LDFLAGS('-pthread', testflags=True)
+
     conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True)
 
     conf.SAMBA_CONFIG_H()
