void-packages/srcpkgs/btfs/patches/musl.patch

27 lines
884 B
Diff

Detect pthread_setname_np() availability correctly... do not assume !apple
has this. Fixes build on musl and probably others.
--xtraeme
--- src/btfs.cc.orig 2016-01-17 08:36:07.655244984 +0100
+++ src/btfs.cc 2016-01-17 08:37:05.383786560 +0100
@@ -502,7 +502,7 @@ btfs_init(struct fuse_conn_info *conn) {
pthread_create(&alert_thread, NULL, alert_queue_loop,
new Log(p->save_path + "/../log.txt"));
-#ifndef __APPLE__
+#ifdef HAVE_PTHREAD_SETNAME_NP
pthread_setname_np(alert_thread, "alert");
#endif
--- configure.ac.orig 2016-01-17 08:38:51.015777545 +0100
+++ configure.ac 2016-01-17 08:40:40.383803576 +0100
@@ -19,4 +19,7 @@ AC_TYPE_SIZE_T
# Checks for library functions.
AC_CHECK_FUNCS([memset mkdir realpath strdup])
+# Check for unportable pthread_setname_np()
+AC_CHECK_LIB(pthread, pthread_setname_np)
+
AC_OUTPUT(Makefile src/Makefile scripts/Makefile)