From 48f70e76d8e8e856e6e3fb945a073f9f7d0efecc Mon Sep 17 00:00:00 2001 From: Nikolai Lifanov Date: Fri, 27 Jan 2017 03:16:36 +0000 Subject: new port: net-mgmt/netdata NetData is scalable, distributed real-time performance and health monitoring. PR: 216497 Submitted by: Mahdi Mokhtari Reviewed by: lifanov, matthew Approved by: matthew (mentor) Differential Revision: https://reviews.freebsd.org/D9351 --- net-mgmt/netdata/files/patch-src_plugin__freebsd.c | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 net-mgmt/netdata/files/patch-src_plugin__freebsd.c (limited to 'net-mgmt/netdata/files/patch-src_plugin__freebsd.c') 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; +-} -- cgit v1.2.3