Commit 507b265d authored by Pekka Pessi's avatar Pekka Pessi

su_uniqueid.c: Solaris misdefines PTHREAD_ONCE_INIT

Ignore-this: 9fe2247164d572901ed4a30b009353db

Solaris defines pthread_once_t as a struct containing an array. The
initializer PTHREAD_ONCE_INIT needs two levels of brackets it but only has
one. Original patch from Mike Jerris <mike@jerris.com>.

darcs-hash:20090519170030-db55f-218c80b78e9ef367b8f1d19f4543b53a1a602cec.gz
parent 8ca57386
......@@ -84,6 +84,11 @@ union state {
#include <pthread.h>
#if __sun
#undef PTHREAD_ONCE_INIT
#define PTHREAD_ONCE_INIT {{ 0, 0, 0, PTHREAD_ONCE_NOTDONE }}
#endif
static pthread_once_t once = PTHREAD_ONCE_INIT;
static int done_once = 1;
static pthread_key_t state_key;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment