ntdll: Protect inclusion of the mach/mach.h conditional header.

Francois Gouget fgouget at free.fr
Fri Jan 26 06:20:51 CST 2007


---

Adding '#ifdef HAVE_MACH_MACH_H' is not strictly necessary since these 
includes are already inside an '#ifdef __APPLE__'. But if we're not 
going to add them, then there's not much point having an 
HAVE_MACH_MACH_H in the first place.

 dlls/ntdll/critsection.c |    2 ++
 dlls/ntdll/server.c      |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/ntdll/critsection.c b/dlls/ntdll/critsection.c
index 2be8af2..755938d 100644
--- a/dlls/ntdll/critsection.c
+++ b/dlls/ntdll/critsection.c
@@ -125,7 +125,9 @@ static inline void close_semaphore( RTL_CRITICAL_SECTION *crit )
 
 #elif defined(__APPLE__)
 
+#ifdef HAVE_MACH_MACH_H
 #include <mach/mach.h>
+#endif
 #include <mach/task.h>
 #include <mach/semaphore.h>
 
diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c
index ce0c3af..4be6f04 100644
--- a/dlls/ntdll/server.c
+++ b/dlls/ntdll/server.c
@@ -936,7 +936,9 @@ static void create_config_dir(void)
 
 
 #ifdef __APPLE__
+#ifdef HAVE_MACH_MACH_H
 #include <mach/mach.h>
+#endif
 #include <mach/mach_error.h>
 #include <servers/bootstrap.h>
 
-- 
1.4.4.3




More information about the wine-patches mailing list