From 7a6bc98a1ea07991d8ff00a9b77be196bd9cef45 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Fri, 29 May 2020 16:52:15 +0200 Subject: lib: Check rdrbuff sanitize for robust mutexes The sanitize function in the rdrbuff should only be compiled if robust mutexes are present on the system. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/lib/shm_rdrbuff.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/shm_rdrbuff.c b/src/lib/shm_rdrbuff.c index 9a003e21..76943989 100644 --- a/src/lib/shm_rdrbuff.c +++ b/src/lib/shm_rdrbuff.c @@ -101,12 +101,14 @@ static void garbage_collect(struct shm_rdrbuff * rdrb) pthread_cond_broadcast(rdrb->healthy); } +#ifdef HAVE_ROBUST_MUTEX static void sanitize(struct shm_rdrbuff * rdrb) { --get_head_ptr(rdrb)->refs; garbage_collect(rdrb); pthread_mutex_consistent(rdrb->lock); } +#endif static char * rdrb_filename(void) { -- cgit v1.2.3