summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-04-02 14:09:06 +0000
committerbors <bors@rust-lang.org>2023-04-02 14:09:06 +0000
commit82f6fd2c33d72b6252bc14103362fff02a93ce55 (patch)
treece0025109f83b12ccc8ee827ca1aed641e53600d
parent7adf246da838e6ae8d5cafb4ffe44098aa03c223 (diff)
parentfa122dfe23d33ed746bffd8c22dbce32f2a58700 (diff)
downloadrust-libc-82f6fd2c33d72b6252bc14103362fff02a93ce55.tar.gz
Auto merge of #3174 - devnexen:redox_reallocarray, r=JohnTitor
redox reallocarray addition
-rw-r--r--libc-test/semver/redox.txt1
-rw-r--r--src/unix/redox/mod.rs3
2 files changed, 4 insertions, 0 deletions
diff --git a/libc-test/semver/redox.txt b/libc-test/semver/redox.txt
index 7751939311..c8f5d400c5 100644
--- a/libc-test/semver/redox.txt
+++ b/libc-test/semver/redox.txt
@@ -204,6 +204,7 @@ open_wmemstream
pipe2
pthread_condattr_setclock
qsort
+reallocarray
setrlimit
setservent
strcasecmp
diff --git a/src/unix/redox/mod.rs b/src/unix/redox/mod.rs
index f1bc9cc543..6661ea7358 100644
--- a/src/unix/redox/mod.rs
+++ b/src/unix/redox/mod.rs
@@ -1043,6 +1043,9 @@ extern "C" {
pub fn pthread_cancel(thread: ::pthread_t) -> ::c_int;
pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
+ // stdlib.h
+ pub fn reallocarray(ptr: *mut ::c_void, nmemb: ::size_t, size: ::size_t) -> *mut ::c_void;
+
// string.h
pub fn strlcat(dst: *mut ::c_char, src: *const ::c_char, siz: ::size_t) -> ::size_t;
pub fn strlcpy(dst: *mut ::c_char, src: *const ::c_char, siz: ::size_t) -> ::size_t;