summaryrefslogtreecommitdiff
path: root/sysdep/unix/log.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2013-11-19 22:33:48 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2013-11-19 22:33:48 +0100
commit1ec522538fb81a56b068c087d0a842faf7aa7869 (patch)
tree84dc0555c224120da8772b1714e7e4f1dfa66aa5 /sysdep/unix/log.c
parent0e175f9f0fd872e95225355dbdeca49cd35ec0fd (diff)
BFD protocol, ready for release.
Supports OSPF and BGP and also statically configured sessions.
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>