Description: Link against pthread on the Hurd, to work around bug #578432
Author: Gabriele Giacone <1o5g4r8o@gmail.com>
Bug-Debian: http://bugs.debian.org/749095

diff --git a/wscript b/wscript
index cd11baa..b671fd6 100644
--- a/wscript
+++ b/wscript
@@ -197,6 +197,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()
