]> granicus.if.org Git - libevent/commitdiff
Fix a warning in evutil_rand when building with threads disabled
authorNick Mathewson <nickm@torproject.org>
Mon, 18 Jul 2011 01:48:38 +0000 (21:48 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 18 Jul 2011 01:48:38 +0000 (21:48 -0400)
evutil_rand.c

index 82ea115eac93ce896bff35e22a1820534a64ff12..27b505d6717949f5b2826f5a02ad6e50edf9e03c 100644 (file)
@@ -89,7 +89,9 @@ arc4random_buf(void *buf, size_t n)
 #define ARC4RANDOM_EXPORT static
 #define _ARC4_LOCK() EVLOCK_LOCK(arc4rand_lock, 0)
 #define _ARC4_UNLOCK() EVLOCK_UNLOCK(arc4rand_lock, 0)
+#ifndef _EVENT_DISABLE_THREAD_SUPPORT
 static void *arc4rand_lock;
+#endif
 
 #define ARC4RANDOM_UINT32 ev_uint32_t
 #define ARC4RANDOM_NOSTIR