Guard errnos not available on FreeBSD

This commit is contained in:
Michael Chiu committed 2025-01-17 14:30:51 -08:00
1 parent 61a2af5e8b
commit 7e73a336fb
3 files changed
+7 -7

No files matched your search

+3 -3
View File
@@ -1294,7 +1294,7 @@ public struct Errno: RawRepresentable, Error, Hashable, Codable {
@available(*, unavailable, renamed: "multiHop")
public static var EMULTIHOP: Errno { multiHop }
#if !os(WASI)
#if !os(WASI) && !os(FreeBSD)
/// No message available.
///
/// No message was available to be received by the requested operation.
@@ -1320,7 +1320,7 @@ public struct Errno: RawRepresentable, Error, Hashable, Codable {
@available(*, unavailable, renamed: "noLink")
public static var ENOLINK: Errno { noLink }
#if !os(WASI)
#if !os(WASI) && !os(FreeBSD)
/// Reserved.
///
/// This error is reserved for future use.
@@ -1361,7 +1361,7 @@ public struct Errno: RawRepresentable, Error, Hashable, Codable {
@available(*, unavailable, renamed: "protocolError")
public static var EPROTO: Errno { protocolError }
#if !os(OpenBSD) && !os(WASI)
#if !os(FreeBSD) && !os(OpenBSD) && !os(WASI)
/// Reserved.
///
/// This error is reserved for future use.
+3 -3
View File
@@ -422,7 +422,7 @@ internal var _EBADMSG: CInt { EBADMSG }
@_alwaysEmitIntoClient
internal var _EMULTIHOP: CInt { EMULTIHOP }
#if !os(WASI)
#if !os(WASI) && !os(FreeBSD)
@_alwaysEmitIntoClient
internal var _ENODATA: CInt { ENODATA }
#endif
@@ -430,7 +430,7 @@ internal var _ENODATA: CInt { ENODATA }
@_alwaysEmitIntoClient
internal var _ENOLINK: CInt { ENOLINK }
#if !os(WASI)
#if !os(WASI) && !os(FreeBSD)
@_alwaysEmitIntoClient
internal var _ENOSR: CInt { ENOSR }
@@ -442,7 +442,7 @@ internal var _ENOSTR: CInt { ENOSTR }
@_alwaysEmitIntoClient
internal var _EPROTO: CInt { EPROTO }
#if !os(OpenBSD) && !os(WASI)
#if !os(OpenBSD) && !os(WASI) && !os(FreeBSD)
@_alwaysEmitIntoClient
internal var _ETIME: CInt { ETIME }
#endif
+1 -1
View File
@@ -191,7 +191,7 @@ internal func system_confstr(
internal let SYSTEM_AT_REMOVE_DIR = AT_REMOVEDIR
internal let SYSTEM_DT_DIR = DT_DIR
internal typealias system_dirent = dirent
#if os(Linux) || os(Android)
#if os(Linux) || os(Android) || os(FreeBSD)
internal typealias system_DIRPtr = OpaquePointer
#else
internal typealias system_DIRPtr = UnsafeMutablePointer<DIR>