From 05f17794e425e406b9ca7a0f916730680c523bd8 Mon Sep 17 00:00:00 2001
From: Jeremy Soller <jeremy@system76.com>
Date: Sun, 2 Dec 2018 15:26:37 -0700
Subject: [PATCH] Return correct error code from access

---
 src/platform/redox/mod.rs | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/platform/redox/mod.rs b/src/platform/redox/mod.rs
index 324da886e..eaf0de9ac 100644
--- a/src/platform/redox/mod.rs
+++ b/src/platform/redox/mod.rs
@@ -59,11 +59,9 @@ impl Pal for Sys {
     fn access(path: &CStr, mode: c_int) -> c_int {
         let fd = match File::open(path, fcntl::O_PATH | fcntl::O_CLOEXEC) {
             Ok(fd) => fd,
-            Err(_) => unsafe {
-                errno = EIO;
-                return -1;
-            },
+            Err(_) => return -1,
         };
+
         if mode == F_OK {
             return 0;
         }
-- 
GitLab