btfs: update to 2.9.

This commit is contained in:
Juan RP 2016-05-06 07:16:19 +02:00
parent a724b0d87b
commit 6d6f9d7560
3 changed files with 46 additions and 28 deletions

View File

@ -0,0 +1,44 @@
https://github.com/johang/btfs/pull/29
From 8abf27a7bf6c0d172410f14555f2e9f0862f45f6 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@voidlinux.eu>
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

View File

@ -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)

View File

@ -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 <xtraeme@voidlinux.eu>"
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