2023-08-16 22:26:55 +00:00
|
|
|
Index: absl/status/status.cc
|
|
|
|
--- absl/status/status.cc.orig
|
|
|
|
+++ absl/status/status.cc
|
2023-08-21 05:20:32 +00:00
|
|
|
@@ -464,14 +464,18 @@ StatusCode ErrnoToStatusCode(int error_number) {
|
2023-08-16 22:26:55 +00:00
|
|
|
case EFAULT: // Bad address
|
|
|
|
case EILSEQ: // Illegal byte sequence
|
|
|
|
case ENOPROTOOPT: // Protocol not available
|
|
|
|
+#ifdef ENOSTR
|
|
|
|
case ENOSTR: // Not a STREAM
|
|
|
|
+#endif
|
|
|
|
case ENOTSOCK: // Not a socket
|
|
|
|
case ENOTTY: // Inappropriate I/O control operation
|
|
|
|
case EPROTOTYPE: // Protocol wrong type for socket
|
|
|
|
case ESPIPE: // Invalid seek
|
|
|
|
return StatusCode::kInvalidArgument;
|
|
|
|
case ETIMEDOUT: // Connection timed out
|
|
|
|
+#ifdef ETIME
|
|
|
|
case ETIME: // Timer expired
|
|
|
|
+#endif
|
|
|
|
return StatusCode::kDeadlineExceeded;
|
|
|
|
case ENODEV: // No such device
|
|
|
|
case ENOENT: // No such file or directory
|
2023-08-21 05:20:32 +00:00
|
|
|
@@ -530,9 +534,13 @@ StatusCode ErrnoToStatusCode(int error_number) {
|
2023-08-16 22:26:55 +00:00
|
|
|
case EMLINK: // Too many links
|
|
|
|
case ENFILE: // Too many open files in system
|
|
|
|
case ENOBUFS: // No buffer space available
|
|
|
|
+#ifdef ENODATA
|
|
|
|
case ENODATA: // No message is available on the STREAM read queue
|
|
|
|
+#endif
|
|
|
|
case ENOMEM: // Not enough space
|
|
|
|
+#ifdef ENOSR
|
|
|
|
case ENOSR: // No STREAM resources
|
|
|
|
+#endif
|
|
|
|
#ifdef EUSERS
|
|
|
|
case EUSERS: // Too many users
|
|
|
|
#endif
|
2023-08-21 05:20:32 +00:00
|
|
|
@@ -575,7 +583,9 @@ StatusCode ErrnoToStatusCode(int error_number) {
|
2023-08-16 22:26:55 +00:00
|
|
|
case ENETRESET: // Connection aborted by network
|
|
|
|
case ENETUNREACH: // Network unreachable
|
|
|
|
case ENOLCK: // No locks available
|
|
|
|
+#ifdef ENOLINK
|
|
|
|
case ENOLINK: // Link has been severed
|
|
|
|
+#endif
|
|
|
|
#ifdef ENONET
|
|
|
|
case ENONET: // Machine is not on the network
|
|
|
|
#endif
|