Package: libxcrypt
Version: 1:2.4-1.1
Severity: serious
Tags: patch
Justification: fails to build from source (but built successfully in the
past)
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu raring ubuntu-patch

Dear Maintainer,

This patch fixes an Ubuntu ftbfs for libxcrypt.
Due to a newer version of glibc that includes patch 9463518d:
http://sourceware.org/git/?p=glibc.git;a=commit;h=9463518d0d314d7bd0160315e0ef30e15be08985
libxcrypt no longer compiles on Ubuntu.
This patch replaces the __libc_lock* functions with pthread locking
functions
that behave in the same manner.

  * Change __libc_lock to use pthread_mutex interfaces because
__libc_lock interfaces were deprecated by patch 9463518d in glibc.


Thanks for considering the patch.


-- System Information:
Debian Release: wheezy/sid
  APT prefers precise-updates
  APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500,
'precise-proposed'), (500, 'precise'), (100, 'precise-backports')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-35-lowlatency (SMP w/8 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

diff -u libxcrypt-2.4/debian/changelog libxcrypt-2.4/debian/changelog
only in patch2:
unchanged:
--- libxcrypt-2.4.orig/src/crypt_util.c
+++ libxcrypt-2.4/src/crypt_util.c
@@ -29,8 +29,7 @@
 #endif
 #include <string.h>
 
-#include <bits/libc-lock.h>
-#define __libc_lock_t pthread_mutex_t
+#include <pthread.h>
 
 #ifndef STATIC
 #define STATIC static
@@ -264,7 +263,7 @@
  */
 struct crypt_data _ufc_foobar;
 
-__libc_lock_define_initialized (static, _ufc_tables_lock)
+static pthread_mutex_t _ufc_tables_lock = PTHREAD_MUTEX_INITIALIZER;
 
 #ifdef DEBUG
 
@@ -362,7 +361,7 @@
 #endif
 
   if(small_tables_initialized == 0) {
-    __libc_lock_lock (_ufc_tables_lock);
+    pthread_mutex_lock (&_ufc_tables_lock);
     if(small_tables_initialized)
       goto small_tables_done;
 
@@ -467,7 +466,7 @@
     }
     small_tables_initialized = 1;
 small_tables_done:
-    __libc_lock_unlock(_ufc_tables_lock);
+    pthread_mutex_unlock(&_ufc_tables_lock);
   }
 
   /*

Reply via email to