X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Ftarget_notification.c;h=cb68048b6a8f7c042cdd37bbf7dc3c77a24bd754;hb=82e27678f8972d2625b466e7e7ba9daaa6395c98;hp=f77d33872076a901e48ce1fcf2ec624c2c623517;hpb=380be79e07e62dd2e0a6d3bd6710dca3b46481a6;p=collectd.git diff --git a/src/target_notification.c b/src/target_notification.c index f77d3387..cb68048b 100644 --- a/src/target_notification.c +++ b/src/target_notification.c @@ -19,44 +19,6 @@ * Florian Forster **/ -/* - * First tell the compiler to stick to the C99 and POSIX standards as close as - * possible. - */ -#ifndef __STRICT_ANSI__ /* {{{ */ -# define __STRICT_ANSI__ -#endif - -#ifndef _ISOC99_SOURCE -# define _ISOC99_SOURCE -#endif - -#ifdef _POSIX_C_SOURCE -# undef _POSIX_C_SOURCE -#endif -#define _POSIX_C_SOURCE 200112L - -#if 0 -/* Single UNIX needed for strdup. */ -#ifdef _XOPEN_SOURCE -# undef _XOPEN_SOURCE -#endif -#define _XOPEN_SOURCE 500 -#endif - -#ifndef _REENTRANT -# define _REENTRANT -#endif - -#ifndef _THREAD_SAFE -# define _THREAD_SAFE -#endif - -#ifdef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* }}} */ - #include "collectd.h" #include "common.h" #include "filter_chain.h" @@ -223,7 +185,7 @@ static int tn_create (const oconfig_item_t *ci, void **user_data) /* {{{ */ } /* }}} int tn_create */ static int tn_invoke (const data_set_t *ds, value_list_t *vl, /* {{{ */ - notification_meta_t **meta, void **user_data) + notification_meta_t __attribute__((unused)) **meta, void **user_data) { tn_data_t *data; notification_t n; @@ -247,7 +209,7 @@ static int tn_invoke (const data_set_t *ds, value_list_t *vl, /* {{{ */ /* Initialize the structure. */ memset (&n, 0, sizeof (n)); n.severity = data->severity; - n.time = time (NULL); + n.time = cdtime (); sstrncpy (n.message, data->message, sizeof (n.message)); sstrncpy (n.host, vl->host, sizeof (n.host)); sstrncpy (n.plugin, vl->plugin, sizeof (n.plugin));