summaryrefslogtreecommitdiff
path: root/sysdep/unix/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep/unix/log.c')
-rw-r--r--sysdep/unix/log.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sysdep/unix/log.c b/sysdep/unix/log.c
index 67b70773..9dd4d66f 100644
--- a/sysdep/unix/log.c
+++ b/sysdep/unix/log.c
@@ -36,13 +36,20 @@ static const bird_clock_t rate_limit_time = 5;
static const int rate_limit_count = 5;
-// XXX add ifdef for threads
+#ifdef USE_PTHREADS
#include <pthread.h>
static pthread_mutex_t log_mutex;
static inline void log_lock(void) { pthread_mutex_lock(&log_mutex); }
static inline void log_unlock(void) { pthread_mutex_unlock(&log_mutex); }
+#else
+
+static inline void log_lock(void) { }
+static inline void log_unlock(void) { }
+
+#endif
+
#ifdef HAVE_SYSLOG
#include <sys/syslog.h>