bees: fix build on musl & platforms without 64-bit atomics

This commit is contained in:
hazen2215 2023-07-03 23:37:33 +09:00 committed by classabbyamp
parent 61779ea150
commit f4f66773a5
3 changed files with 27 additions and 3 deletions

View File

@ -0,0 +1,23 @@
--- a/lib/task.cc
+++ b/lib/task.cc
@@ -289,7 +289,6 @@
lock.unlock();
char buf[24] = { 0 };
- DIE_IF_MINUS_ERRNO(pthread_getname_np(pthread_self(), buf, sizeof(buf)));
DIE_IF_MINUS_ERRNO(pthread_setname_np(pthread_self(), m_title.c_str()));
TaskStatePtr this_task = shared_from_this();
--- a/src/bees-trace.cc
+++ b/src/bees-trace.cc
@@ -136,10 +136,6 @@
// OK try the pthread name next.
char buf[24];
memset(buf, '\0', sizeof(buf));
- int err = pthread_getname_np(pthread_self(), buf, sizeof(buf));
- if (err) {
- return string("pthread_getname_np: ") + strerror(err);
- }
buf[sizeof(buf) - 1] = '\0';
// thread_getname_np returns process name

View File

@ -1,2 +1,3 @@
0001-don-t-run-tests-unless-asked.patch
0002-move-sbin-into-bin.patch
pthread_getname1.patch

View File

@ -1,8 +1,7 @@
# Template file for 'bees'
pkgname=bees
version=0.8
revision=1
archs="~*-musl"
revision=2
build_style=gnu-makefile
make_check_target="test"
hostmakedepends="pkg-config"
@ -24,7 +23,8 @@ if [ "$CROSS_BUILD" ]; then
fi
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
broken="undefined reference to __atomic_fetch_add_8"
makedepends+=" libatomic-devel"
CXXFLAGS+=" -latomic"
fi
pre_build() {