From: Florian Forster Date: Wed, 31 Jan 2007 14:38:36 +0000 (+0100) Subject: unixsock plugin: Finally fixed the `pthread_t'-initialization to be platform independant. X-Git-Tag: collectd-4.0.0~208 X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=931a471d277b43e455e304c00322168c7c6240e7 unixsock plugin: Finally fixed the `pthread_t'-initialization to be platform independant. --- diff --git a/src/unixsock.c b/src/unixsock.c index f6dbf730..12ebc099 100644 --- a/src/unixsock.c +++ b/src/unixsock.c @@ -74,7 +74,7 @@ static char *sock_file = NULL; static char *sock_group = NULL; static int sock_perms = S_IRWXU | S_IRWXG; -static pthread_t listen_thread = NULL; +static pthread_t listen_thread = (pthread_t) 0; /* Linked list and auxilliary variables for saving values */ static value_cache_t *cache_head = NULL; @@ -654,10 +654,11 @@ static int us_shutdown (void) { void *ret; - if (listen_thread != NULL) + if (listen_thread != (pthread_t) 0) { pthread_kill (listen_thread, SIGTERM); pthread_join (listen_thread, &ret); + listen_thread = (pthread_t) 0; } plugin_unregister_init ("unixsock");