From 24194525057b73ecc1d78b7853ce1bbd6ceaf9c2 Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Mon, 20 Nov 2017 15:39:30 +0000 Subject: [PATCH] Correct return types of NetBSD specific functions The __libc_mutex_lock, __libc_mutex_unlock and __libc_thr_setcancelstate functions return int, not void. This does not seem to introduce a functional change, however it looks better with fixed the function prototype. Sponsored by llvm-svn: 318654 --- .../lib/sanitizer_common/sanitizer_common_interceptors.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc index efe86977538d..09e9b6eca171 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc @@ -3829,11 +3829,11 @@ INTERCEPTOR(int, pthread_mutex_unlock, void *m) { #endif #if SANITIZER_NETBSD -INTERCEPTOR(void, __libc_mutex_lock, void *m) \ +INTERCEPTOR(int, __libc_mutex_lock, void *m) \ ALIAS(WRAPPER_NAME(pthread_mutex_lock)); -INTERCEPTOR(void, __libc_mutex_unlock, void *m) \ +INTERCEPTOR(int, __libc_mutex_unlock, void *m) \ ALIAS(WRAPPER_NAME(pthread_mutex_unlock)); -INTERCEPTOR(void, __libc_thr_setcancelstate, int state, int *oldstate) \ +INTERCEPTOR(int, __libc_thr_setcancelstate, int state, int *oldstate) \ ALIAS(WRAPPER_NAME(pthread_setcancelstate)); #endif