diff options
author | fhajny <fhajny@pkgsrc.org> | 2014-06-14 12:21:02 +0000 |
---|---|---|
committer | fhajny <fhajny@pkgsrc.org> | 2014-06-14 12:21:02 +0000 |
commit | 827fe13191cccba2dbd658fe24c8e0a4ebf62183 (patch) | |
tree | 29ab11c8f15cec9f373adff24835d85ce81bbcd2 /sysutils/collectd | |
parent | 89b3bebd2ab137a9cb72a40851b7a5b51deb7ab9 (diff) | |
download | pkgsrc-827fe13191cccba2dbd658fe24c8e0a4ebf62183.tar.gz |
Fix the network plugin for NetBSD. Fix the previously committed tcpconns
plugin patch to stop breaking on NetBSD 6.1.
Diffstat (limited to 'sysutils/collectd')
-rw-r--r-- | sysutils/collectd/distinfo | 6 | ||||
-rw-r--r-- | sysutils/collectd/patches/patch-src_network.c | 59 | ||||
-rw-r--r-- | sysutils/collectd/patches/patch-src_tcpconns.c | 6 |
3 files changed, 49 insertions, 22 deletions
diff --git a/sysutils/collectd/distinfo b/sysutils/collectd/distinfo index efce44164a6..0a2203caa3c 100644 --- a/sysutils/collectd/distinfo +++ b/sysutils/collectd/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.2 2014/02/23 16:34:27 mspo Exp $ +$NetBSD: distinfo,v 1.3 2014/06/14 12:21:02 fhajny Exp $ SHA1 (collectd-5.4.1.tar.gz) = faaccac4daf48449bcefc9d6f9236f98a5dd5b4b RMD160 (collectd-5.4.1.tar.gz) = a98ff2d845238d4792f732aa7518effdc95e24f9 @@ -10,5 +10,5 @@ SHA1 (patch-src_collectd.c) = 31106ca27dd4911c40285fece48f76a1c36e2407 SHA1 (patch-src_collectd.conf.in) = 97400dbc16a31a440750beed0bc16927afdcb570 SHA1 (patch-src_df.c) = 19cca888b183a90759b359702e4d65c8afa6e58d SHA1 (patch-src_libcollectclient_network__buffer.c) = e07d403d299613fa0885a0e7285849eb85510253 -SHA1 (patch-src_network.c) = 03ed5169903bb579470e77228400dec077ff16cb -SHA1 (patch-src_tcpconns.c) = 7aa5fa63e0d3b60a298f9db6392698c6e456a786 +SHA1 (patch-src_network.c) = b07c206406642b37788dd8d0aefe437158473b97 +SHA1 (patch-src_tcpconns.c) = 52f5351d7544e2fec9376385c316680025da5db2 diff --git a/sysutils/collectd/patches/patch-src_network.c b/sysutils/collectd/patches/patch-src_network.c index 96151cfec55..77c57edeea1 100644 --- a/sysutils/collectd/patches/patch-src_network.c +++ b/sysutils/collectd/patches/patch-src_network.c @@ -1,23 +1,50 @@ -$NetBSD: patch-src_network.c,v 1.1 2014/02/17 11:21:55 fhajny Exp $ +$NetBSD: patch-src_network.c,v 1.2 2014/06/14 12:21:02 fhajny Exp $ -Need the workaround on at least SunOS too. ---- src/network.c.orig 2014-01-26 08:09:23.532559941 +0000 +Remove libgcrypt deprecation logic. Patch by joerg. +--- src/network.c.orig 2014-01-26 08:09:23.000000000 +0000 +++ src/network.c -@@ -59,7 +59,7 @@ +@@ -58,25 +58,7 @@ + #endif #if HAVE_LIBGCRYPT - # include <pthread.h> +-# include <pthread.h> -# if defined __APPLE__ -+# if defined(__APPLE__) || defined(__sun) - /* default xcode compiler throws warnings even when deprecated functionality - * is not used. -Werror breaks the build because of erroneous warnings. - * http://stackoverflow.com/questions/10556299/compiler-warnings-with-libgcrypt-v1-5-0/12830209#12830209 -@@ -72,7 +72,7 @@ - */ - # define GCRYPT_NO_DEPRECATED +-/* default xcode compiler throws warnings even when deprecated functionality +- * is not used. -Werror breaks the build because of erroneous warnings. +- * http://stackoverflow.com/questions/10556299/compiler-warnings-with-libgcrypt-v1-5-0/12830209#12830209 +- */ +-# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +-# endif +-/* FreeBSD's copy of libgcrypt extends the existing GCRYPT_NO_DEPRECATED +- * to properly hide all deprecated functionality. +- * http://svnweb.freebsd.org/ports/head/security/libgcrypt/files/patch-src__gcrypt.h.in +- */ +-# define GCRYPT_NO_DEPRECATED # include <gcrypt.h> -# if defined __APPLE__ -+# if defined(__APPLE__) || defined(__sun) - /* Re enable deprecation warnings */ - # pragma GCC diagnostic warning "-Wdeprecated-declarations" - # endif +-/* Re enable deprecation warnings */ +-# pragma GCC diagnostic warning "-Wdeprecated-declarations" +-# endif +-GCRY_THREAD_OPTION_PTHREAD_IMPL; + #endif + + #ifndef IPV6_ADD_MEMBERSHIP +@@ -501,17 +483,9 @@ static void network_init_gcrypt (void) / + if (gcry_control (GCRYCTL_ANY_INITIALIZATION_P)) + return; + +- /* http://www.gnupg.org/documentation/manuals/gcrypt/Multi_002dThreading.html +- * To ensure thread-safety, it's important to set GCRYCTL_SET_THREAD_CBS +- * *before* initalizing Libgcrypt with gcry_check_version(), which itself must +- * be called before any other gcry_* function. GCRYCTL_ANY_INITIALIZATION_P +- * above doesn't count, as it doesn't implicitly initalize Libgcrypt. +- * +- * tl;dr: keep all these gry_* statements in this exact order please. */ +- gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); + gcry_check_version (NULL); + gcry_control (GCRYCTL_INIT_SECMEM, 32768); +- gcry_control (GCRYCTL_INITIALIZATION_FINISHED); ++ gcry_control (GCRYCTL_INITIALIZATION_FINISHED,NULL,0); + } /* }}} void network_init_gcrypt */ + + static gcry_cipher_hd_t network_get_aes256_cypher (sockent_t *se, /* {{{ */ diff --git a/sysutils/collectd/patches/patch-src_tcpconns.c b/sysutils/collectd/patches/patch-src_tcpconns.c index ba55a7b34f4..2cf5cdcb281 100644 --- a/sysutils/collectd/patches/patch-src_tcpconns.c +++ b/sysutils/collectd/patches/patch-src_tcpconns.c @@ -1,4 +1,4 @@ -$NetBSD: patch-src_tcpconns.c,v 1.1 2014/02/23 16:34:27 mspo Exp $ +$NetBSD: patch-src_tcpconns.c,v 1.2 2014/06/14 12:21:02 fhajny Exp $ --- src/tcpconns.c.orig 2014-01-26 08:09:14.000000000 +0000 +++ src/tcpconns.c @@ -14,7 +14,7 @@ $NetBSD: patch-src_tcpconns.c,v 1.1 2014/02/23 16:34:27 mspo Exp $ /* Get the `head' pcb */ head = (struct inpcb *) &(inpcbtable_ptr->inpt_queue); /* Get the first pcb */ -+#if __NetBSD_Version__ > 600000000 ++#if __NetBSD_Version__ >= 699000000 + next = (struct inpcb *)TAILQ_FIRST (&table.inpt_queue); +#else next = (struct inpcb *)CIRCLEQ_FIRST (&table.inpt_queue); @@ -26,7 +26,7 @@ $NetBSD: patch-src_tcpconns.c,v 1.1 2014/02/23 16:34:27 mspo Exp $ kread ((u_long) next, &inpcb, sizeof (inpcb)); /* Advance `next' */ -+#if __NetBSD_Version__ > 600000000 ++#if __NetBSD_Version__ >= 699000000 + next = (struct inpcb *)TAILQ_NEXT (&inpcb, inp_queue); +#else next = (struct inpcb *)CIRCLEQ_NEXT (&inpcb, inp_queue); |