From 8d5f3c22d7b6dd3499c20b6a148d1645d7f997aa Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Tue, 16 Jul 2013 05:47:05 +0000 Subject: - Update to 1.0.3 PR: 180508 Submitted by: ports fury --- ftp/pftpd/files/patch-plib-support.c | 48 +++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 17 deletions(-) (limited to 'ftp/pftpd/files/patch-plib-support.c') diff --git a/ftp/pftpd/files/patch-plib-support.c b/ftp/pftpd/files/patch-plib-support.c index 4d2023aecea6..84dfabce5dba 100644 --- a/ftp/pftpd/files/patch-plib-support.c +++ b/ftp/pftpd/files/patch-plib-support.c @@ -1,18 +1,32 @@ ---- plib/support.c.orig Thu Jan 9 14:25:01 2003 -+++ plib/support.c Mon May 23 20:46:01 2005 -@@ -145,6 +145,15 @@ - pthread_mutex_init(&pwd_lock, NULL); - } +--- plib/support.c.orig Thu Jan 9 22:25:01 2003 ++++ plib/support.c Wed Apr 6 00:38:41 2005 +@@ -369,11 +369,13 @@ + return code; + + #else ++ pthread_once_t grp_once; ++ pthread_mutex_t grp_lock; + struct group *gp; + int i, len; -+static pthread_mutex_t grp_lock; -+static pthread_once_t grp_once = PTHREAD_ONCE_INIT; -+ -+static void -+grp_lock_init(void) -+{ -+ pthread_mutex_init(&grp_lock, NULL); -+} -+ - static char * - strcopy(const char *str, char **buf, size_t *avail) - { + +- pthread_once(&grp_once, grp_lock_init); ++ pthread_once(&grp_once, NULL); + pthread_mutex_lock(&grp_lock); + + gp = getgrgid(gid); +@@ -452,11 +454,13 @@ + return code; + + #else ++ pthread_once_t grp_once; ++ pthread_mutex_t grp_lock; + struct group *gp; + int i, len; + + +- pthread_once(&grp_once, grp_lock_init); ++ pthread_once(&grp_once, NULL); + pthread_mutex_lock(&grp_lock); + + gp = getgrnam(name); -- cgit v1.2.3