add test for errno
@@ -0,0 +1 @@
+extern int errno;
@@ -29,6 +29,7 @@ use core::fmt;
use types::*;
#[thread_local]
+#[no_mangle]
pub static mut errno: c_int = 0;
pub unsafe fn c_str(s: *const c_char) -> &'static [u8] {
@@ -0,0 +1,8 @@
+#include <unistd.h>
+#include <stdio.h>
+#include <errno.h>
+
+int main(int argc, char** argv) {
+ chdir("nonexistent");
+ printf("errno: %d\n", errno);
+}