Skip to content

Commit 6e94220

Browse files
Laura7089tgross35
authored andcommitted
Add get_hostname and _SC_HOST_NAME_MAX to esp-idf
1 parent ffb7f0c commit 6e94220

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/unix/newlib/espidf/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ pub const SIGHUP: ::c_int = 1;
9999
pub const SIGQUIT: ::c_int = 3;
100100
pub const NSIG: ::size_t = 32;
101101

102+
pub const _SC_HOST_NAME_MAX: ::c_int = 65;
103+
102104
extern "C" {
103105
pub fn pthread_create(
104106
native: *mut ::pthread_t,
@@ -109,6 +111,8 @@ extern "C" {
109111

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

114+
pub fn gethostname(name: *mut ::c_char, namelen: ::ssize_t);
115+
112116
#[link_name = "lwip_sendmsg"]
113117
pub fn sendmsg(s: ::c_int, msg: *const ::msghdr, flags: ::c_int) -> ::ssize_t;
114118
#[link_name = "lwip_recvmsg"]

0 commit comments

Comments
 (0)