mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 07:33:48 +02:00
bees: fix build on musl & platforms without 64-bit atomics
This commit is contained in:
parent
61779ea150
commit
f4f66773a5
3 changed files with 27 additions and 3 deletions
23
srcpkgs/bees/patches/pthread_getname1.patch
Normal file
23
srcpkgs/bees/patches/pthread_getname1.patch
Normal 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
|
|
@ -1,2 +1,3 @@
|
||||||
0001-don-t-run-tests-unless-asked.patch
|
0001-don-t-run-tests-unless-asked.patch
|
||||||
0002-move-sbin-into-bin.patch
|
0002-move-sbin-into-bin.patch
|
||||||
|
pthread_getname1.patch
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
# Template file for 'bees'
|
# Template file for 'bees'
|
||||||
pkgname=bees
|
pkgname=bees
|
||||||
version=0.8
|
version=0.8
|
||||||
revision=1
|
revision=2
|
||||||
archs="~*-musl"
|
|
||||||
build_style=gnu-makefile
|
build_style=gnu-makefile
|
||||||
make_check_target="test"
|
make_check_target="test"
|
||||||
hostmakedepends="pkg-config"
|
hostmakedepends="pkg-config"
|
||||||
|
@ -24,7 +23,8 @@ if [ "$CROSS_BUILD" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
||||||
broken="undefined reference to __atomic_fetch_add_8"
|
makedepends+=" libatomic-devel"
|
||||||
|
CXXFLAGS+=" -latomic"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pre_build() {
|
pre_build() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue