make NIO cross-compilable

This commit is contained in:
Johannes Weiss committed 2018-01-10 11:16:07 +00:00
1 parent c79c5ba364
commit 7996d12bed
2 files changed
+6 -4

No files matched your search

+4
View File
@@ -13,7 +13,11 @@
//===----------------------------------------------------------------------===//
#ifndef C_NIO_LINUX_H
#define C_NIO_LINUX_H
#ifdef __linux__
#include <sys/epoll.h>
#include <sys/eventfd.h>
#include <sys/timerfd.h>
#endif
#endif
+2 -4
View File
@@ -20,14 +20,12 @@
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
@_exported import Darwin.C
#elseif os(Linux)
@_exported import Glibc
import CNIOLinux
#elseif os(FreeBSD) || os(Android)
#elseif os(Linux) || os(FreeBSD) || os(Android)
@_exported import Glibc
#else
let badOS = { fatalError("unsupported OS") }()
#endif
import CNIOLinux
private func isBlacklistedErrno(_ code: Int32) -> Bool {
switch code {