From 931a471d277b43e455e304c00322168c7c6240e7 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 31 Jan 2007 15:38:36 +0100 Subject: [PATCH] unixsock plugin: Finally fixed the `pthread_t'-initialization to be platform independant. --- src/unixsock.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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"); -- 2.11.0