summaryrefslogtreecommitdiff
path: root/ftp/pftpd/files/patch-plib-support.c
diff options
context:
space:
mode:
Diffstat (limited to 'ftp/pftpd/files/patch-plib-support.c')
-rw-r--r--ftp/pftpd/files/patch-plib-support.c48
1 files changed, 31 insertions, 17 deletions
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);