]> granicus.if.org Git - libevent/commitdiff
Fix compilation of rate-limit code when threading support is disabled
authorNick Mathewson <nickm@torproject.org>
Fri, 22 Jan 2010 05:34:21 +0000 (00:34 -0500)
committerNick Mathewson <nickm@torproject.org>
Fri, 22 Jan 2010 05:34:21 +0000 (00:34 -0500)
evthread-internal.h
test/test-ratelim.c

index e946947e5a38543a31ff0a52d72ad856142f2b5b..a0383a0857248d0d50debd90d6976e96ac0153ba 100644 (file)
@@ -175,7 +175,7 @@ EVLOCK_TRY_LOCK(void *lock)
 #define EVBASE_RELEASE_LOCK(base, lock) _EVUTIL_NIL_STMT
 #define EVLOCK_ASSERT_LOCKED(lock) _EVUTIL_NIL_STMT
 
-#define EVTHREAD_TRY_LOCK(lock) 1
+#define EVLOCK_TRY_LOCK(lock) 1
 #endif
 
 #ifdef __cplusplus
index 59e3ecb128b379b5c6c3a2c5f7f0952ee640e650..92f73e92b464707b9fde5d241a163b04bd9cfb6b 100644 (file)
@@ -340,7 +340,9 @@ main(int argc, char **argv)
 #endif
        }
 
+#ifndef _EVENT_DISABLE_THREAD_SUPPORT
        evthread_enable_lock_debuging();
+#endif
 
        test_ratelimiting();