1
- From e8131d6a00005b4686f26d25d8617dd83540e98d Mon Sep 17 00:00:00 2001
1
+ From b81e3bd53bb4c60e6a778fa230cb8fd2a73b3683 Mon Sep 17 00:00:00 2001
2
2
From: David LeGare <legare@google.com>
3
- Date: Mon, 13 Jun 2022 22:23:23 +0000
3
+ Date: Wed, 22 Jun 2022 18:39:50 +0000
4
4
Subject: [PATCH] Add support for the Trusty OS
5
5
6
+ Change-Id: I7f99f36b85ff5ed2bf71c0d8f6561e32fa25105d
6
7
---
7
- src/lib.rs | 6 ++++++
8
- src/trusty.rs | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++
9
- 2 files changed, 66 insertions(+)
8
+ src/lib.rs | 6 +++++
9
+ src/trusty.rs | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++
10
+ 2 files changed, 69 insertions(+)
10
11
create mode 100644 src/trusty.rs
11
12
12
13
diff --git a/src/lib.rs b/src/lib.rs
13
- index cce80f8c..a7eddaf2 100644
14
+ index ac86322b..cf307958 100644
14
15
--- a/src/lib.rs
15
16
+++ b/src/lib.rs
16
- @@ -144 ,6 +144 ,12 @@ cfg_if! {
17
+ @@ -145 ,6 +145 ,12 @@ cfg_if! {
17
18
18
19
mod hermit;
19
20
pub use hermit::*;
@@ -28,10 +29,10 @@ index cce80f8c..a7eddaf2 100644
28
29
pub use fixed_width_ints::*;
29
30
diff --git a/src/trusty.rs b/src/trusty.rs
30
31
new file mode 100644
31
- index 00000000..f06c0760
32
+ index 00000000..c7e4e4fa
32
33
--- /dev/null
33
34
+++ b/src/trusty.rs
34
- @@ -0,0 +1,60 @@
35
+ @@ -0,0 +1,63 @@
35
36
+ pub use core::ffi::c_void;
36
37
+
37
38
+ pub type size_t = usize;
@@ -72,6 +73,8 @@ index 00000000..f06c0760
72
73
+ pub type c_int32_t = i32;
73
74
+ pub type c_int64_t = i64;
74
75
+
76
+ + pub type time_t = c_long;
77
+ +
75
78
+ pub const STDOUT_FILENO: ::c_int = 1;
76
79
+ pub const STDERR_FILENO: ::c_int = 2;
77
80
+
@@ -84,6 +87,7 @@ index 00000000..f06c0760
84
87
+ pub fn posix_memalign(memptr: *mut *mut ::c_void, align: ::size_t, size: ::size_t) -> ::c_int;
85
88
+ pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t) -> ::ssize_t;
86
89
+ pub fn writev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t;
90
+ + pub fn strlen(cs: *const c_char) -> size_t;
87
91
+ }
88
92
+
89
93
+ s! {
@@ -93,4 +97,5 @@ index 00000000..f06c0760
93
97
+ }
94
98
+ }
95
99
- -
96
- 2.36.1.476.g0c4daa206d-goog
100
+ 2.37.0.rc0.104.g0611611a94-goog
101
+
0 commit comments