From 7e83ba0a384232d552aa2be810cfd51cceeb596c Mon Sep 17 00:00:00 2001 From: imarkov Date: Sun, 12 Sep 2021 13:16:05 +0300 Subject: [PATCH] Support for the ESP-IDF framework - 3 forgotten mappings --- src/unix/newlib/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/unix/newlib/mod.rs b/src/unix/newlib/mod.rs index 4a35356d0c66c..3a7cfa4a25c30 100644 --- a/src/unix/newlib/mod.rs +++ b/src/unix/newlib/mod.rs @@ -611,10 +611,12 @@ extern "C" { target_arch = "powerpc", target_vendor = "nintendo" )))] + #[cfg_attr(target_os = "espidf", link_name = "lwip_bind")] pub fn bind(fd: ::c_int, addr: *const sockaddr, len: socklen_t) -> ::c_int; pub fn clock_settime(clock_id: ::clockid_t, tp: *const ::timespec) -> ::c_int; pub fn clock_gettime(clock_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; pub fn clock_getres(clock_id: ::clockid_t, res: *mut ::timespec) -> ::c_int; + #[cfg_attr(target_os = "espidf", link_name = "lwip_close")] pub fn closesocket(sockfd: ::c_int) -> ::c_int; pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int; #[cfg(not(all( @@ -622,6 +624,7 @@ extern "C" { target_arch = "powerpc", target_vendor = "nintendo" )))] + #[cfg_attr(target_os = "espidf", link_name = "lwip_recvfrom")] pub fn recvfrom( fd: ::c_int, buf: *mut ::c_void,