Skip to content

Commit a13b05f

Browse files
committed
Exclude some unavailable errors from NSError.
OpenBSD doesn't support these particular errno symbols. Exclude them for this platform.
1 parent 5171b77 commit a13b05f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/Foundation/NSError.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,6 +1344,7 @@ extension POSIXError {
13441344
/// Bad message.
13451345
public static var EBADMSG: POSIXError.Code { return .EBADMSG }
13461346

1347+
#if !os(OpenBSD)
13471348
/// Reserved.
13481349
public static var EMULTIHOP: POSIXError.Code { return .EMULTIHOP }
13491350

@@ -1358,13 +1359,16 @@ extension POSIXError {
13581359

13591360
/// Not a STREAM.
13601361
public static var ENOSTR: POSIXError.Code { return .ENOSTR }
1362+
#endif
13611363

13621364
/// Protocol error.
13631365
public static var EPROTO: POSIXError.Code { return .EPROTO }
13641366

1367+
#if !os(OpenBSD)
13651368
/// STREAM ioctl timeout.
13661369
public static var ETIME: POSIXError.Code { return .ETIME }
13671370
#endif
1371+
#endif
13681372

13691373
#if canImport(Darwin)
13701374
/// No such policy registered.

0 commit comments

Comments
 (0)