Files
fastfetch/src/common/sysctl.h
T

17 lines
570 B
C
Raw Normal View History

2022-09-19 21:31:50 +02:00
#pragma once
#include "fastfetch.h"
2022-10-27 10:46:33 +08:00
2022-09-19 23:16:43 +02:00
#include <sys/types.h>
2022-09-19 21:45:39 +02:00
#include <sys/sysctl.h>
2022-09-19 21:31:50 +02:00
2024-10-04 15:58:17 +08:00
#ifdef __OpenBSD__
const char* ffSysctlGetString(int mib1, int mib2, FFstrbuf* result);
[[nodiscard]] int ffSysctlGetInt(int mib1, int mib2, int defaultValue);
[[nodiscard]] int64_t ffSysctlGetInt64(int mib1, int mib2, int64_t defaultValue);
2024-10-04 15:58:17 +08:00
#else
2022-10-27 10:46:33 +08:00
const char* ffSysctlGetString(const char* propName, FFstrbuf* result);
[[nodiscard]] int ffSysctlGetInt(const char* propName, int defaultValue);
[[nodiscard]] int64_t ffSysctlGetInt64(const char* propName, int64_t defaultValue);
2024-10-04 15:58:17 +08:00
#endif