Skip to content

Commit 82f6fd2

Browse files
committed
Auto merge of rust-lang#3174 - devnexen:redox_reallocarray, r=JohnTitor
redox reallocarray addition
2 parents 7adf246 + fa122df commit 82f6fd2

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

libc-test/semver/redox.txt

+1
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ open_wmemstream
204204
pipe2
205205
pthread_condattr_setclock
206206
qsort
207+
reallocarray
207208
setrlimit
208209
setservent
209210
strcasecmp

src/unix/redox/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,9 @@ extern "C" {
10431043
pub fn pthread_cancel(thread: ::pthread_t) -> ::c_int;
10441044
pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
10451045

1046+
// stdlib.h
1047+
pub fn reallocarray(ptr: *mut ::c_void, nmemb: ::size_t, size: ::size_t) -> *mut ::c_void;
1048+
10461049
// string.h
10471050
pub fn strlcat(dst: *mut ::c_char, src: *const ::c_char, siz: ::size_t) -> ::size_t;
10481051
pub fn strlcpy(dst: *mut ::c_char, src: *const ::c_char, siz: ::size_t) -> ::size_t;

0 commit comments

Comments
 (0)