From 19db28c2448c461ffcb8d770b4bc3701bd504cf1 Mon Sep 17 00:00:00 2001 From: CToID Date: Sat, 2 May 2026 16:20:16 +0800 Subject: [PATCH] cpufetch: update to 1.07. --- srcpkgs/cpufetch/patches/fix-musl.patch | 28 +++++++++++++++++++++++++ srcpkgs/cpufetch/template | 4 ++-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/cpufetch/patches/fix-musl.patch diff --git a/srcpkgs/cpufetch/patches/fix-musl.patch b/srcpkgs/cpufetch/patches/fix-musl.patch new file mode 100644 index 00000000000000..bc8ec9ab7dd8d7 --- /dev/null +++ b/srcpkgs/cpufetch/patches/fix-musl.patch @@ -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); diff --git a/srcpkgs/cpufetch/template b/srcpkgs/cpufetch/template index ae32e8f48383c4..5e7b6f7ceed09d 100644 --- a/srcpkgs/cpufetch/template +++ b/srcpkgs/cpufetch/template @@ -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 @@ -11,7 +11,7 @@ maintainer="clos3y " 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