summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--community/pam_pwcheck/PKGBUILD7
-rw-r--r--community/pam_pwcheck/pam_pwcheck-3.9-pthread.patch58
2 files changed, 63 insertions, 2 deletions
diff --git a/community/pam_pwcheck/PKGBUILD b/community/pam_pwcheck/PKGBUILD
index ca894ea87..4ae03a936 100644
--- a/community/pam_pwcheck/PKGBUILD
+++ b/community/pam_pwcheck/PKGBUILD
@@ -9,11 +9,14 @@ arch=(i686 x86_64 'mips64el')
url="http://www.thkukuk.de/pam/pam_pwcheck/"
depends=('pam')
license=('GPL')
-source=(ftp://ftp.suse.com/pub/people/kukuk/pam/pam_pwcheck/pam_pwcheck-$pkgver.tar.bz2)
-md5sums=('27be63338af88d14610d182b6a161cd1')
+source=(ftp://ftp.suse.com/pub/people/kukuk/pam/pam_pwcheck/pam_pwcheck-$pkgver.tar.bz2
+ pam_pwcheck-3.9-pthread.patch)
+md5sums=('27be63338af88d14610d182b6a161cd1'
+ '0978c56f1321febb5b4fa584f1054773')
build() {
cd $srcdir/$pkgname-$pkgver
+ patch -Np1 -i ${srcdir}/pam_pwcheck-3.9-pthread.patch
./configure --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib
make
make DESTDIR=$pkgdir install
diff --git a/community/pam_pwcheck/pam_pwcheck-3.9-pthread.patch b/community/pam_pwcheck/pam_pwcheck-3.9-pthread.patch
new file mode 100644
index 000000000..ef007b469
--- /dev/null
+++ b/community/pam_pwcheck/pam_pwcheck-3.9-pthread.patch
@@ -0,0 +1,58 @@
+--- pam_pwcheck-3.9.orig/src/read-files.c 2005-10-10 13:38:30.000000000 -0500
++++ pam_pwcheck-3.9/src/read-files.c 2012-12-25 05:23:41.175269985 -0500
+@@ -30,8 +30,7 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <nss.h>
+-#include <bits/libc-lock.h>
+-#define __libc_lock_t pthread_mutex_t
++#include <pthread.h>
+
+ #include "read-files.h"
+
+@@ -341,11 +340,11 @@
+ char *buffer, size_t buflen, int *errnop)
+ {
+ /* Locks the static variables in this file. */
+- __libc_lock_define_initialized (static, lock);
++ static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
+ enum nss_status status;
+ FILE *stream = NULL;
+
+- __libc_lock_lock (lock);
++ pthread_mutex_lock (&lock);
+
+ status = internal_setent (&stream, "/shadow");
+ if (status == NSS_STATUS_SUCCESS)
+@@ -361,7 +360,7 @@
+ internal_endent (&stream);
+ }
+
+- __libc_lock_unlock (lock);
++ pthread_mutex_unlock (&lock);
+
+ return status;
+ }
+@@ -371,11 +370,11 @@
+ char *buffer, size_t buflen, int *errnop)
+ {
+ /* Locks the static variables in this file. */
+- __libc_lock_define_initialized (static, lock);
++ static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
+ enum nss_status status;
+ FILE *stream = NULL;
+
+- __libc_lock_lock (lock);
++ pthread_mutex_lock (&lock);
+
+ status = internal_setent (&stream, "/passwd");
+ if (status == NSS_STATUS_SUCCESS)
+@@ -391,7 +390,7 @@
+ internal_endent (&stream);
+ }
+
+- __libc_lock_unlock (lock);
++ pthread_mutex_unlock (&lock);
+
+ return status;
+ }