Skip to content

Commit ec2ea5e

Browse files
committed
redox add strlcpy api
1 parent 74e81a5 commit ec2ea5e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

libc-test/semver/redox.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ setrlimit
207207
setservent
208208
strcasecmp
209209
strcasestr
210+
strlcat
211+
strlcpy
210212
strncasecmp
211213
strndup
212214
strsignal

src/unix/redox/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,10 @@ 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+
// string.h
1047+
pub fn strlcat(dst: *mut ::c_char, src: *const ::c_char, siz: ::size_t) -> ::size_t;
1048+
pub fn strlcpy(dst: *mut ::c_char, src: *const ::c_char, siz: ::size_t) -> ::size_t;
1049+
10461050
// sys/epoll.h
10471051
pub fn epoll_create(size: ::c_int) -> ::c_int;
10481052
pub fn epoll_create1(flags: ::c_int) -> ::c_int;

0 commit comments

Comments
 (0)