diff --git a/srcpkgs/btfs/patches/0001-Check-for-pthread_setname_np-correctly.patch b/srcpkgs/btfs/patches/0001-Check-for-pthread_setname_np-correctly.patch new file mode 100644 index 00000000000..0490d0b1239 --- /dev/null +++ b/srcpkgs/btfs/patches/0001-Check-for-pthread_setname_np-correctly.patch @@ -0,0 +1,44 @@ +https://github.com/johang/btfs/pull/29 + +From 8abf27a7bf6c0d172410f14555f2e9f0862f45f6 Mon Sep 17 00:00:00 2001 +From: Juan RP +Date: Fri, 6 May 2016 07:08:28 +0200 +Subject: [PATCH] Check for pthread_setname_np() correctly. + +Do not blindly assume that it's available in all OSes but Apple. +Not all C libraries implement this because it's a non POSIX extension. + +Fixes compilation with the musl C library. +--- + configure.ac | 3 +++ + src/btfs.cc | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 15be5df..030c7ff 100644 +--- configure.ac ++++ configure.ac +@@ -23,4 +23,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) +diff --git a/src/btfs.cc b/src/btfs.cc +index 2d0a434..bbdf6d3 100644 +--- src/btfs.cc ++++ src/btfs.cc +@@ -512,7 +512,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 + +-- +2.8.2 + diff --git a/srcpkgs/btfs/patches/musl.patch b/srcpkgs/btfs/patches/musl.patch deleted file mode 100644 index 883c00c68ec..00000000000 --- a/srcpkgs/btfs/patches/musl.patch +++ /dev/null @@ -1,26 +0,0 @@ -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) diff --git a/srcpkgs/btfs/template b/srcpkgs/btfs/template index 48f14072a5d..356da472abf 100644 --- a/srcpkgs/btfs/template +++ b/srcpkgs/btfs/template @@ -1,6 +1,6 @@ # Template file for 'btfs' pkgname=btfs -version=2.8 +version=2.9 revision=1 build_style=gnu-configure hostmakedepends="automake pkg-config" @@ -10,7 +10,7 @@ maintainer="Juan RP " license="GPL-2" homepage="https://github.com/johang/btfs" distfiles="https://github.com/johang/btfs/archive/v${version}.tar.gz" -checksum=bc0c6b85cc71650f73b13b98f2e04195641d00ca517b05ceba86b78dacc0f415 +checksum=35a87a76f22c14f8d56cd6071e849f706465b5e8586c892debd055b637398609 pre_configure() { autoreconf -fi