Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions srcpkgs/cpufetch/patches/fix-musl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/src/x86/freq/freq.c b/src/x86/freq/freq.c
index 308b8af..50049ab 100644
--- a/src/x86/freq/freq.c
+++ b/src/x86/freq/freq.c
@@ -158,17 +158,18 @@ int32_t measure_frequency(struct cpuInfo* cpu, int32_t *max_freq_pp_vec) {
// on the correct core.
CPU_ZERO(&cpus);
CPU_SET(i, &cpus);
- if ((ret = pthread_attr_setaffinity_np(&attr, sizeof(cpu_set_t), &cpus)) != 0) {
- printErr("pthread_attr_setaffinity_np: %s", strerror(ret));
- return -1;
- }
-
ret = pthread_create(&compute_th[i], &attr, compute_function, NULL);

if(ret != 0) {
fprintf(stderr, "Error creating thread\n");
return -1;
}
+
+ if ((ret = pthread_setaffinity_np(compute_th[i], sizeof(cpu_set_t), &cpus)) != 0) {
+ printErr("pthread_setaffinity_np: %s", strerror(ret));
+ return -1;
+ }
+
}

sleep_ms(500);
4 changes: 2 additions & 2 deletions srcpkgs/cpufetch/template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Template file for 'cpufetch'
pkgname=cpufetch
version=1.06
version=1.07
revision=1
archs="~armv5* ~mips*"
build_style=gnu-makefile
Expand All @@ -11,7 +11,7 @@ maintainer="clos3y <sam.w.close@gmail.com>"
license="GPL-2.0-or-later"
homepage="https://github.com/Dr-Noob/cpufetch"
distfiles="https://github.com/Dr-Noob/cpufetch/archive/refs/tags/v${version}.tar.gz"
checksum=b8ec1339cf3a3bb9325cde7fb0748dd609043e8d2938c292956da7e457bdb7d9
checksum=dc3ec8f9c9d41d8434702a778cc150b196d5d178fd768a964f57d22f268a2c17

do_install() {
vbin cpufetch
Expand Down