diff --git a/src/threadqueue.c b/src/threadqueue.c index 5d24636c8..290651010 100644 --- a/src/threadqueue.c +++ b/src/threadqueue.c @@ -389,7 +389,7 @@ threadqueue_queue_t * kvz_threadqueue_init(int thread_count) threadqueue->first = NULL; threadqueue->last = NULL; -#ifndef _WIN32 +#ifndef _MSC_VER pthread_attr_t attr; if (pthread_attr_init(&attr) != 0) { fprintf(stderr, "pthread_attr_init failed!\n"); @@ -407,7 +407,7 @@ threadqueue_queue_t * kvz_threadqueue_init(int thread_count) } } #else - pthread_attr_t* attr; + pthread_attr_t attr; #endif // Lock the queue before creating threads, to ensure they all have correct information. @@ -425,7 +425,7 @@ threadqueue_queue_t * kvz_threadqueue_init(int thread_count) return threadqueue; failed: -#ifndef _WIN32 +#ifndef _MSC_VER if (pthread_attr_destroy(&attr) != 0) { fprintf(stderr, "pthread_attr_destroy failed!\n"); } diff --git a/src/threadwrapper/include/pthread.h b/src/threadwrapper/include/pthread.h index a6a04d8ea..3620f753d 100644 --- a/src/threadwrapper/include/pthread.h +++ b/src/threadwrapper/include/pthread.h @@ -27,10 +27,10 @@ typedef void* pthread_rwlock_t; typedef void* pthread_t; typedef void*(voidp_voidp_func)(void*); -typedef void pthread_attr_t; -typedef void pthread_condattr_t; -typedef void pthread_mutexattr_t; -typedef void pthread_rwlockattr_t; +typedef void* pthread_attr_t; +typedef void* pthread_condattr_t; +typedef void* pthread_mutexattr_t; +typedef void* pthread_rwlockattr_t; // Parameter names that have been commented away do nothing, // as they are always null when the functions are used in Kvazaar.