diff options
author | Nikolai Lifanov <lifanov@FreeBSD.org> | 2017-01-27 03:16:36 +0000 |
---|---|---|
committer | Nikolai Lifanov <lifanov@FreeBSD.org> | 2017-01-27 03:16:36 +0000 |
commit | 48f70e76d8e8e856e6e3fb945a073f9f7d0efecc (patch) | |
tree | e84f8102c61b62c9fbb52b519a1c74ea72a89cfe /net-mgmt/netdata/files/patch-src_plugin__freebsd.c | |
parent | Update to 0.9.3 (diff) |
new port: net-mgmt/netdata
NetData is scalable, distributed real-time performance and health monitoring.
PR: 216497
Submitted by: Mahdi Mokhtari <mokhi64@gmail.com>
Reviewed by: lifanov, matthew
Approved by: matthew (mentor)
Differential Revision: https://reviews.freebsd.org/D9351
Diffstat (limited to 'net-mgmt/netdata/files/patch-src_plugin__freebsd.c')
-rw-r--r-- | net-mgmt/netdata/files/patch-src_plugin__freebsd.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/net-mgmt/netdata/files/patch-src_plugin__freebsd.c b/net-mgmt/netdata/files/patch-src_plugin__freebsd.c new file mode 100644 index 000000000000..15a9a2ac72da --- /dev/null +++ b/net-mgmt/netdata/files/patch-src_plugin__freebsd.c @@ -0,0 +1,28 @@ +--- src/plugin_freebsd.c.orig 2017-01-22 19:49:22 UTC ++++ src/plugin_freebsd.c +@@ -1,6 +1,6 @@ + #include "common.h" + +-void *freebsd_main(void *ptr) { ++extern void *freebsd_main(void *ptr) { + struct netdata_static_thread *static_thread = (struct netdata_static_thread *)ptr; + + info("FREEBSD Plugin thread created with task id %d", gettid()); +@@ -63,17 +63,3 @@ void *freebsd_main(void *ptr) { + return NULL; + } + +-int getsysctl(const char *name, void *ptr, size_t len) +-{ +- size_t nlen = len; +- +- if (unlikely(sysctlbyname(name, ptr, &nlen, NULL, 0) == -1)) { +- error("FREEBSD: sysctl(%s...) failed: %s", name, strerror(errno)); +- return 1; +- } +- if (unlikely(nlen != len)) { +- error("FREEBSD: sysctl(%s...) expected %lu, got %lu", name, (unsigned long)len, (unsigned long)nlen); +- return 1; +- } +- return 0; +-} |