mirror of
https://github.com/apple/swift-nio
synced 2026-11-28 05:14:23 +00:00
make NIO cross-compilable
This commit is contained in:
1 parent
c79c5ba364
commit
7996d12bed
2 files changed
+6
-4
No files matched your search
@@ -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
|
||||
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user