@@ -1067,7 +1067,7 @@ public struct Errno: RawRepresentable, Error, Hashable, Codable {
1067
1067
public static var ENOSYS : Errno { noFunction }
1068
1068
1069
1069
// BSD
1070
- #if SYSTEM_PACKAGE_DARWIN
1070
+ #if SYSTEM_PACKAGE_DARWIN || os(FreeBSD)
1071
1071
/// Inappropriate file type or format.
1072
1072
///
1073
1073
/// The file was the wrong type for the operation,
@@ -1082,7 +1082,7 @@ public struct Errno: RawRepresentable, Error, Hashable, Codable {
1082
1082
public static var EFTYPE : Errno { badFileTypeOrFormat }
1083
1083
#endif
1084
1084
1085
- #if SYSTEM_PACKAGE_DARWIN
1085
+ #if SYSTEM_PACKAGE_DARWIN || os(FreeBSD)
1086
1086
/// Authentication error.
1087
1087
///
1088
1088
/// The authentication ticket used to mount an NFS file system was invalid.
@@ -1253,7 +1253,7 @@ public struct Errno: RawRepresentable, Error, Hashable, Codable {
1253
1253
@available ( * , unavailable, renamed: " illegalByteSequence " )
1254
1254
public static var EILSEQ : Errno { illegalByteSequence }
1255
1255
1256
- #if SYSTEM_PACKAGE_DARWIN
1256
+ #if SYSTEM_PACKAGE_DARWIN || os(FreeBSD)
1257
1257
/// Attribute not found.
1258
1258
///
1259
1259
/// The specified extended attribute doesn't exist.
@@ -1294,7 +1294,7 @@ public struct Errno: RawRepresentable, Error, Hashable, Codable {
1294
1294
@available ( * , unavailable, renamed: " multiHop " )
1295
1295
public static var EMULTIHOP : Errno { multiHop }
1296
1296
1297
- #if !os(WASI)
1297
+ #if !os(WASI) && !os(FreeBSD)
1298
1298
/// No message available.
1299
1299
///
1300
1300
/// No message was available to be received by the requested operation.
@@ -1320,7 +1320,7 @@ public struct Errno: RawRepresentable, Error, Hashable, Codable {
1320
1320
@available ( * , unavailable, renamed: " noLink " )
1321
1321
public static var ENOLINK : Errno { noLink }
1322
1322
1323
- #if !os(WASI)
1323
+ #if !os(WASI) && !os(FreeBSD)
1324
1324
/// Reserved.
1325
1325
///
1326
1326
/// This error is reserved for future use.
@@ -1361,7 +1361,7 @@ public struct Errno: RawRepresentable, Error, Hashable, Codable {
1361
1361
@available ( * , unavailable, renamed: " protocolError " )
1362
1362
public static var EPROTO : Errno { protocolError }
1363
1363
1364
- #if !os(OpenBSD) && !os(WASI)
1364
+ #if !os(OpenBSD) && !os(WASI) && !os(FreeBSD)
1365
1365
/// Reserved.
1366
1366
///
1367
1367
/// This error is reserved for future use.
@@ -1459,6 +1459,38 @@ extension Errno {
1459
1459
public static var EOWNERDEAD : Errno { previousOwnerDied }
1460
1460
#endif
1461
1461
1462
+ #if os(FreeBSD)
1463
+ /// Capabilities insufficient.
1464
+ ///
1465
+ /// The corresponding C error is `ENOTCAPABLE`.
1466
+ @_alwaysEmitIntoClient
1467
+ public static var notCapable : Errno { . init( rawValue: _ENOTCAPABLE) }
1468
+
1469
+ @_alwaysEmitIntoClient
1470
+ @available ( * , unavailable, renamed: " notCapable " )
1471
+ public static var ENOTCAPABLE : Errno { notCapable }
1472
+
1473
+ /// Not permitted in capability mode.
1474
+ ///
1475
+ /// The corresponding C error is `ECAPMODE`.
1476
+ @_alwaysEmitIntoClient
1477
+ public static var capabilityMode : Errno { . init( rawValue: _ECAPMODE) }
1478
+
1479
+ @_alwaysEmitIntoClient
1480
+ @available ( * , unavailable, renamed: " capabilityMode " )
1481
+ public static var ECAPMODE : Errno { capabilityMode }
1482
+
1483
+ /// Integrity check failed.
1484
+ ///
1485
+ /// The corresponding C error is `EINTEGRITY`.
1486
+ @_alwaysEmitIntoClient
1487
+ public static var integrityCheckFailed : Errno { . init( rawValue: _EINTEGRITY) }
1488
+
1489
+ @_alwaysEmitIntoClient
1490
+ @available ( * , unavailable, renamed: " integrityCheckFailed " )
1491
+ public static var EINTEGRITY : Errno { integrityCheckFailed }
1492
+ #endif
1493
+
1462
1494
#if SYSTEM_PACKAGE_DARWIN
1463
1495
/// Interface output queue is full.
1464
1496
///
@@ -1469,7 +1501,9 @@ extension Errno {
1469
1501
@_alwaysEmitIntoClient
1470
1502
@available ( * , unavailable, renamed: " outputQueueFull " )
1471
1503
public static var EQFULL : Errno { outputQueueFull }
1504
+ #endif
1472
1505
1506
+ #if SYSTEM_PACKAGE_DARWIN || os(FreeBSD)
1473
1507
/// The largest valid error.
1474
1508
///
1475
1509
/// This value is the largest valid value
0 commit comments