File: libc-lock.patch

package info (click to toggle)
libxcrypt 1%3A2.4-3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 1,672 kB
  • sloc: sh: 8,666; ansic: 2,905; makefile: 96
file content (40 lines) | stat: -rw-r--r-- 869 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
--- 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);
   }
 
   /*