aboutsummaryrefslogtreecommitdiff
path: root/patches/trusty-003.patch
blob: a848fe1d897247f1244e775128a4fda7a5f454fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
commit b0659bcf79d2f5a5ba2ed8690bc98441fed4f0eb
Author: Andrei Homescu <ahomescu@google.com>
Date:   Fri Nov 3 22:08:34 2023 +0000

    Add close() system call for Trusty
    
    std calls libc::close() so we need to add it.
    
    Bug: 242243245
    Change-Id: Ia273a2ae451d913e362047b047a65fbfed072f92

diff --git a/src/trusty.rs b/src/trusty.rs
index e1508119..140fa6df 100644
--- a/src/trusty.rs
+++ b/src/trusty.rs
@@ -58,6 +58,7 @@ extern "C" {
     pub fn posix_memalign(memptr: *mut *mut ::c_void, align: ::size_t, size: ::size_t) -> ::c_int;
     pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t) -> ::ssize_t;
     pub fn writev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t;
+    pub fn close(fd: ::c_int) -> ::c_int;
     pub fn strlen(cs: *const c_char) -> size_t;
     pub fn getauxval(type_: c_ulong) -> c_ulong;
     pub fn mmap(