summaryrefslogtreecommitdiffstats
path: root/libnetdata/os.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-01-26 18:05:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-01-26 18:05:42 +0000
commit112b5b91647c3dea45cc1c9bc364df526c8012f1 (patch)
tree450af925135ec664c4310a1eb28b69481094ee2a /libnetdata/os.c
parentReleasing debian version 1.32.1-2. (diff)
downloadnetdata-112b5b91647c3dea45cc1c9bc364df526c8012f1.tar.xz
netdata-112b5b91647c3dea45cc1c9bc364df526c8012f1.zip
Merging upstream version 1.33.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libnetdata/os.c')
-rw-r--r--libnetdata/os.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/libnetdata/os.c b/libnetdata/os.c
index 4271a917..196288a6 100644
--- a/libnetdata/os.c
+++ b/libnetdata/os.c
@@ -123,7 +123,9 @@ void get_system_HZ(void) {
// =====================================================================================================================
// FreeBSD
-#if (TARGET_OS == OS_FREEBSD)
+#if __FreeBSD__
+
+const char *os_type = "freebsd";
int getsysctl_by_name(const char *name, void *ptr, size_t len) {
size_t nlen = len;
@@ -198,7 +200,9 @@ int getsysctl_mib(const char *name, int *mib, size_t len) {
// =====================================================================================================================
// MacOS
-#if (TARGET_OS == OS_MACOS)
+#if __APPLE__
+
+const char *os_type = "macos";
int getsysctl_by_name(const char *name, void *ptr, size_t len) {
size_t nlen = len;
@@ -214,4 +218,13 @@ int getsysctl_by_name(const char *name, void *ptr, size_t len) {
return 0;
}
-#endif // (TARGET_OS == OS_MACOS)
+#endif
+
+// =====================================================================================================================
+// Linux
+
+#if __linux__
+
+const char *os_type = "linux";
+
+#endif