Skip to content

Commit aa08df7

Browse files
pcctgross35
authored andcommitted
Support mkostemp, mkostemps on Android
Bionic supports it since API level 23. See: https://github.com/aosp-mirror/platform_bionic/blob/2215ad406b253f12e270cdd0876e19e9df2aa6d4/libc/include/stdlib.h (apply <#3601> to `main`) [ update to use new prelude, as is needed since the switch to the new edition - Trevor ] (cherry picked from commit efff8c7)
1 parent be79077 commit aa08df7

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/unix/linux_like/emscripten/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,8 +1512,6 @@ extern "C" {
15121512
pub fn pwritev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t;
15131513
pub fn preadv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t;
15141514
pub fn dup3(oldfd: c_int, newfd: c_int, flags: c_int) -> c_int;
1515-
pub fn mkostemp(template: *mut c_char, flags: c_int) -> c_int;
1516-
pub fn mkostemps(template: *mut c_char, suffixlen: c_int, flags: c_int) -> c_int;
15171515
pub fn nl_langinfo_l(item: crate::nl_item, locale: crate::locale_t) -> *mut c_char;
15181516
pub fn accept4(
15191517
fd: c_int,

src/unix/linux_like/linux/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6372,8 +6372,6 @@ extern "C" {
63726372
sigmask: *const crate::sigset_t,
63736373
) -> c_int;
63746374
pub fn dup3(oldfd: c_int, newfd: c_int, flags: c_int) -> c_int;
6375-
pub fn mkostemp(template: *mut c_char, flags: c_int) -> c_int;
6376-
pub fn mkostemps(template: *mut c_char, suffixlen: c_int, flags: c_int) -> c_int;
63776375
pub fn sigtimedwait(
63786376
set: *const sigset_t,
63796377
info: *mut siginfo_t,

src/unix/linux_like/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1886,6 +1886,9 @@ extern "C" {
18861886
) -> size_t;
18871887
pub fn strptime(s: *const c_char, format: *const c_char, tm: *mut crate::tm) -> *mut c_char;
18881888

1889+
pub fn mkostemp(template: *mut c_char, flags: c_int) -> c_int;
1890+
pub fn mkostemps(template: *mut c_char, suffixlen: c_int, flags: c_int) -> c_int;
1891+
18891892
pub fn getdomainname(name: *mut c_char, len: size_t) -> c_int;
18901893
pub fn setdomainname(name: *const c_char, len: size_t) -> c_int;
18911894
}

0 commit comments

Comments
 (0)