From 82442a51b35dc9bc8e05632188ec72f6667d3e90 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Thu, 25 Dec 2014 14:24:47 +0100 Subject: [PATCH] Fix a few warnings which show up with -Wundef Also remove DARWIN, since OS X doesn't define that --- pdns/dns.hh | 2 +- pdns/unix_semaphore.cc | 2 +- pdns/utility.hh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pdns/dns.hh b/pdns/dns.hh index 711ef1c21..63f65c7f9 100644 --- a/pdns/dns.hh +++ b/pdns/dns.hh @@ -144,7 +144,7 @@ struct EDNS0Record uint16_t Z; } GCCPACKATTRIBUTE; -#if __FreeBSD__ || __APPLE__ || __OpenBSD__ || __DragonFly__ || defined(__FreeBSD_kernel__) +#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__) #include #elif __linux__ || __GNU__ # include diff --git a/pdns/unix_semaphore.cc b/pdns/unix_semaphore.cc index 50a350ebd..7064bc98d 100644 --- a/pdns/unix_semaphore.cc +++ b/pdns/unix_semaphore.cc @@ -34,7 +34,7 @@ #include -#if DARWIN || _AIX || __APPLE__ +#if defined(_AIX) || defined(__APPLE__) // Darwin 6.0 Compatible implementation, uses pthreads so it portable across more platforms. diff --git a/pdns/utility.hh b/pdns/utility.hh index 870ee2f3d..6280279c8 100644 --- a/pdns/utility.hh +++ b/pdns/utility.hh @@ -52,7 +52,7 @@ class Semaphore private: typedef int sem_value_t; -#if DARWIN || _AIX || __APPLE__ +#if defined(_AIX) || defined(__APPLE__) uint32_t m_magic; pthread_mutex_t m_lock; pthread_cond_t m_gtzero; -- 2.40.0