Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 429656
Collapse All | Expand All

(-)libxcrypt-2.4/src/crypt_util.c (-4 / +5 lines)
Lines 29-35 Link Here
29
#endif
29
#endif
30
#include <string.h>
30
#include <string.h>
31
31
32
#include <pthread.h>
32
#include <bits/libc-lock.h>
33
#define __libc_lock_t pthread_mutex_t
33
34
34
#ifndef STATIC
35
#ifndef STATIC
35
#define STATIC static
36
#define STATIC static
Lines 263-269 Link Here
263
 */
264
 */
264
struct crypt_data _ufc_foobar;
265
struct crypt_data _ufc_foobar;
265
266
266
static pthread_mutex_t _ufc_tables_lock = PTHREAD_MUTEX_INITIALIZER;
267
__libc_lock_define_initialized (static, _ufc_tables_lock)
267
268
268
#ifdef DEBUG
269
#ifdef DEBUG
269
270
Lines 361-367 Link Here
361
#endif
362
#endif
362
363
363
  if(small_tables_initialized == 0) {
364
  if(small_tables_initialized == 0) {
364
    pthread_mutex_lock (&_ufc_tables_lock);
365
    __libc_lock_lock (_ufc_tables_lock);
365
    if(small_tables_initialized)
366
    if(small_tables_initialized)
366
      goto small_tables_done;
367
      goto small_tables_done;
367
368
Lines 466-472 Link Here
466
    }
467
    }
467
    small_tables_initialized = 1;
468
    small_tables_initialized = 1;
468
small_tables_done:
469
small_tables_done:
469
    pthread_mutex_unlock(&_ufc_tables_lock);
470
    __libc_lock_unlock(_ufc_tables_lock);
470
  }
471
  }
471
472
472
  /*
473
  /*

Return to bug 429656