summaryrefslogtreecommitdiff
path: root/net/samba4/patches/patch-lib_tevent_tevent.c
blob: 1fd13526a33eded4736a09f29ca96eac1252593d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$NetBSD: patch-lib_tevent_tevent.c,v 1.1 2019/09/05 12:39:56 hauke Exp $

On SunOS (OpenSolaris), pthread_mutex_init() expects a zeroed-out
mutex data structure
    
--- lib/tevent/tevent.c.orig	2019-01-15 10:07:00.000000000 +0000
+++ lib/tevent/tevent.c
@@ -423,6 +423,7 @@ static int tevent_common_context_constru
 		return ret;
 	}
 
+	memset(&ev->scheduled_mutex, 0, sizeof(pthread_mutex_t));
 	ret = pthread_mutex_init(&ev->scheduled_mutex, NULL);
 	if (ret != 0) {
 		return ret;