From bf4b74eee9e4889881e855b876756fb3a5406361 Mon Sep 17 00:00:00 2001 From: Sergey Kraev Date: Wed, 1 Nov 2017 16:20:16 +0300 Subject: [PATCH] Change MUTEX to RECURSIVE_MUTEX Fix bug. Perl > 5.20 version hang on functions 'getgrent' and 'getpwent'. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Изменения, которые будут включены в коммит: изменено: src/interface.c --- src/interface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/interface.c b/src/interface.c index 7c6475c..dc6d731 100644 --- a/src/interface.c +++ b/src/interface.c @@ -10,12 +10,13 @@ * */ +#define _GNU_SOURCE #include "nss-pgsql.h" #include #include #include -static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; +static pthread_mutex_t lock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; /* * passwd functions