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
1 changed files with 1 additions and 3 deletions

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) {