1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-15 09:44:04 +00:00

Fix build on FreeBSD.

The freq_sysctl varaible is being redefined with a different type.

Update the first definition directly.
This commit is contained in:
Guido Falsi 2023-05-17 13:29:06 +02:00 committed by bi4k8
parent ddddf00eb5
commit 796802b7a9

View File

@ -544,15 +544,13 @@ void get_acpi_fan(char *p_client_buffer, size_t client_buffer_size) {
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));
if (GETSYSCTL(freq_sysctl, freq) == 0) {