Skip to content

Commit

Permalink
Merge pull request rust-lang#3934 from Laura7089/feat/esp-idf-hostname
Browse files Browse the repository at this point in the history
Add `get_hostname` to esp-idf

(backport <rust-lang#3934>)
(cherry picked from commit 600e1d1)
  • Loading branch information
tgross35 committed Nov 15, 2024
1 parent 539e7e7 commit bd00c8e
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
49 changes: 49 additions & 0 deletions libc-test/semver/espidf.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
AF_INET6
AF_UNIX
FIONBIO
MSG_CTRUNC
MSG_DONTROUTE
MSG_DONTWAIT
MSG_EOR
MSG_MORE
MSG_NOSIGNAL
MSG_OOB
MSG_PEEK
MSG_TRUNC
MSG_WAITALL
NSIG
POLLERR
POLLHUP
POLLIN
POLLOUT
POLLPRI
POLLRDBAND
POLLRDNORM
POLLWRBAND
POLLWRNORM
PTHREAD_STACK_MIN
SIGABRT
SIGFPE
SIGHUP
SIGILL
SIGINT
SIGQUIT
SIGSEGV
SIGTERM
SOL_SOCKET
cmsghdr
dirent
eventfd
gethostname
getrandom
msghdr
pthread_create
recvmsg
sendmsg
sigset_t
sockaddr
sockaddr_in
sockaddr_in6
sockaddr_storage
sockaddr_un
stat
2 changes: 2 additions & 0 deletions src/unix/newlib/espidf/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ extern "C" {

pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t;

pub fn gethostname(name: *mut ::c_char, namelen: ::ssize_t);

#[link_name = "lwip_sendmsg"]
pub fn sendmsg(s: ::c_int, msg: *const ::msghdr, flags: ::c_int) -> ::ssize_t;
#[link_name = "lwip_recvmsg"]
Expand Down

0 comments on commit bd00c8e

Please sign in to comment.