* bufferevent_private. */
#define BEV_UPCAST(b) EVUTIL_UPCAST((b), struct bufferevent_private, bev)
+#ifdef _EVENT_DISABLE_THREAD_SUPPORT
+#define BEV_LOCK(b) _EVUTIL_NIL_STMT
+#define BEV_UNLOCK(b) _EVUTIL_NIL_STMT
+#else
/** Internal: Grab the lock (if any) on a bufferevent */
#define BEV_LOCK(b) do { \
struct bufferevent_private *locking = BEV_UPCAST(b); \
struct bufferevent_private *locking = BEV_UPCAST(b); \
EVLOCK_UNLOCK(locking->lock, 0); \
} while (0)
+#endif
+
/* ==== For rate-limiting. */