diff options
author | Robert Noland <rnoland@2hip.net> | 2009-09-22 11:49:57 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-09-28 09:48:45 -0600 |
commit | d09941c8cc2d4620eb774744c8878921b9dc3bcc (patch) | |
tree | 00d8b079e3e0844210e00f9cb446795b832d7a03 /src/glx | |
parent | fc613848e6f8f1c5405a7612b00a02ac2a794b80 (diff) | |
download | external_mesa3d-d09941c8cc2d4620eb774744c8878921b9dc3bcc.zip external_mesa3d-d09941c8cc2d4620eb774744c8878921b9dc3bcc.tar.gz external_mesa3d-d09941c8cc2d4620eb774744c8878921b9dc3bcc.tar.bz2 |
Fix build on non GLIBC platforms (FreeBSD at least)
Build was broken by commit 9666529b5a5be1fcde82caadc2fe2efa5ea81e49
I'm not certain that this is entirely the correct fix since the demo
from bug #23774 seemed to work before the commit that broke the build.
Signed-off-by: Robert Noland <rnoland@2hip.net>
Signed-off-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/x11/glxhash.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/glx/x11/glxhash.c b/src/glx/x11/glxhash.c index 6f2c51d..b76ec32 100644 --- a/src/glx/x11/glxhash.c +++ b/src/glx/x11/glxhash.c @@ -88,6 +88,12 @@ #define HASH_ALLOC malloc #define HASH_FREE free +#ifndef __GLIBC__ +#define HASH_RANDOM_DECL char *ps, rs[256] +#define HASH_RANDOM_INIT(seed) ps = initstate(seed, rs, sizeof(rs)) +#define HASH_RANDOM random() +#define HASH_RANDOM_DESTROY setstate(ps) +#else #define HASH_RANDOM_DECL struct random_data rd; int32_t rv; char rs[256] #define HASH_RANDOM_INIT(seed) \ do { \ @@ -96,6 +102,7 @@ } while(0) #define HASH_RANDOM ((void) random_r(&rd, &rv), rv) #define HASH_RANDOM_DESTROY +#endif typedef struct __glxHashBucket { |