libxcrypt-2.4-glibc-2.16.patch 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. diff -urN libxcrypt-3.0.2/src/crypt_util.c libxcrypt-3.0.2.new/src/crypt_util.c
  2. --- libxcrypt-3.0.2/src/crypt_util.c 2007-10-25 15:17:46.000000000 +0200
  3. +++ libxcrypt-3.0.2.new/src/crypt_util.c 2013-02-04 12:45:20.560191479 +0100
  4. @@ -30,8 +30,7 @@
  5. #endif
  6. #include <string.h>
  7. -#include <bits/libc-lock.h>
  8. -#define __libc_lock_t pthread_mutex_t
  9. +#include <pthread.h>
  10. #ifndef STATIC
  11. #define STATIC static
  12. @@ -265,7 +264,7 @@
  13. */
  14. struct crypt_data _ufc_foobar;
  15. -__libc_lock_define_initialized (static, _ufc_tables_lock)
  16. +static pthread_mutex_t _ufc_tables_lock = PTHREAD_MUTEX_INITIALIZER;
  17. #ifdef DEBUG
  18. @@ -362,7 +361,7 @@
  19. #endif
  20. if(small_tables_initialized == 0) {
  21. - __libc_lock_lock (_ufc_tables_lock);
  22. + pthread_mutex_lock (&_ufc_tables_lock);
  23. if(small_tables_initialized)
  24. goto small_tables_done;
  25. @@ -471,7 +470,7 @@
  26. }
  27. small_tables_initialized = 1;
  28. small_tables_done:
  29. - __libc_lock_unlock(_ufc_tables_lock);
  30. + pthread_mutex_unlock (&_ufc_tables_lock);
  31. }
  32. /*