Merge pull request #849 from pvzig/swift-3.1-branch-SR-3362
diff --git a/CoreFoundation/Base.subproj/CFBase.h b/CoreFoundation/Base.subproj/CFBase.h
index 8193a7c..6cd690a 100644
--- a/CoreFoundation/Base.subproj/CFBase.h
+++ b/CoreFoundation/Base.subproj/CFBase.h
@@ -68,10 +68,6 @@
#include <stdbool.h>
#endif
-#if __BLOCKS__
-#include <Block.h>
-#endif
-
#if ((TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)) || (TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)) && !DEPLOYMENT_RUNTIME_SWIFT
#include <libkern/OSTypes.h>
#endif
diff --git a/CoreFoundation/Base.subproj/CFInternal.h b/CoreFoundation/Base.subproj/CFInternal.h
index 3b60cc2..a716f90 100644
--- a/CoreFoundation/Base.subproj/CFInternal.h
+++ b/CoreFoundation/Base.subproj/CFInternal.h
@@ -104,14 +104,14 @@
#endif
#include <pthread.h>
-#if __has_include(<os/log.h>)
+#if !DEPLOYMENT_RUNTIME_SWIFT && __has_include(<os/log.h>)
#import <os/log.h>
#else
typedef struct os_log_s *os_log_t;
-#define os_log(...)
-#define os_log_info(...)
-#define os_log_debug(...)
-#define os_log_error(...)
+#define os_log(...) do { } while (0)
+#define os_log_info(...) do { } while (0)
+#define os_log_debug(...) do { } while (0)
+#define os_log_error(...) do { } while (0)
#define os_log_create(...) (NULL)
#endif
diff --git a/CoreFoundation/RunLoop.subproj/CFMachPort.c b/CoreFoundation/RunLoop.subproj/CFMachPort.c
index 457cef5..60b61c4 100644
--- a/CoreFoundation/RunLoop.subproj/CFMachPort.c
+++ b/CoreFoundation/RunLoop.subproj/CFMachPort.c
@@ -20,7 +20,6 @@
#include <stdio.h>
#include "CFInternal.h"
#include <os/lock.h>
-#include <os/log.h>
// This queue is used for the cancel/event handler for dead name notification.