Changeset 137 for trunk/src/sh_mem.c


Ignore:
Timestamp:
Oct 28, 2007, 1:17:58 AM (17 years ago)
Author:
rainer
Message:

Fix compile errors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_mem.c

    r134 r137  
    2020#include "config_xor.h"
    2121
     22/* With glibc, _XOPEN_SOURCE 500 is required for
     23 * pthread_mutexattr_settype/PTHREAD_MUTEX_RECURSIVE
     24 */
     25#if defined(HAVE_PTHREAD) && defined(MEM_DEBUG)
     26#define _XOPEN_SOURCE 500
     27#endif
    2228
    2329#include <stdio.h>
     
    108114static pthread_mutex_t mutex_mem;
    109115
    110 static int initialize_mem(void)
     116static void initialize_mem(void)
    111117{
    112118  pthread_mutexattr_t   mta;
     
    114120  pthread_mutex_init(&mutex_mem, &mta);
    115121  pthread_mutexattr_destroy(&mta);
    116   return 0;
     122  return;
    117123}
    118124#define MEM_MUTEX_INIT  (void) pthread_once(&mem_is_initialized, initialize_mem)
Note: See TracChangeset for help on using the changeset viewer.