freebsd-ports/sysutils/conky/files/patch-src_freebsd.cc
Guido Falsi ec60b2c5aa sysutils/conky: Update to 1.19.2
Add patch to fix build.

Patch submitted upstream: https://github.com/brndnmtthws/conky/pull/1539
2023-05-17 22:23:13 +02:00

18 lines
571 B
C++

--- src/freebsd.cc.orig 2023-05-15 21:39:11 UTC
+++ src/freebsd.cc
@@ -544,14 +544,12 @@ char get_freq(char *p_client_buffer, size_t client_buf
char get_freq(char *p_client_buffer, size_t client_buffer_size,
const char *p_format, int divisor, unsigned int cpu) {
int freq;
- char *freq_sysctl;
+ char freq_sysctl[16] = {0};
if (!p_client_buffer || client_buffer_size <= 0 || !p_format ||
divisor <= 0) {
return 0;
}
-
- char freq_sysctl[16] = {0};
snprintf(freq_sysctl, sizeof(freq_sysctl), "dev.cpu.%d.freq", (cpu - 1));