Skip to content

Commit 1f28e05

Browse files
committed
Auto merge of #2864 - ivmarkov:master, r=Amanieu
Socket constants necessary for ESP-IDF support in socket2 I would like to upstream the support for [ESP-IDF](https://github.com/espressif/esp-idf) in the [socket2 crate](https://github.com/esp-rs-compat/socket2). (Which in turn is necessary for Rust async networking support on top of ESP-IDF.) To tidy up the patch and remove [this](rust-lang/socket2@master...esp-rs-compat:socket2:master#diff-bbdb7821e30b05ce3afbaa9fbc1526c18d6670d65479baaca3beaf4ea6174891R80) and [this](rust-lang/socket2@master...esp-rs-compat:socket2:master#diff-bbdb7821e30b05ce3afbaa9fbc1526c18d6670d65479baaca3beaf4ea6174891R413) TODOs I need these constants defined in the `libc` crate
2 parents 4b7908f + 919e823 commit 1f28e05

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/unix/newlib/espidf/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ pub const MSG_DONTROUTE: ::c_int = 0x4;
8383
pub const MSG_WAITALL: ::c_int = 0x02;
8484
pub const MSG_MORE: ::c_int = 0x10;
8585
pub const MSG_NOSIGNAL: ::c_int = 0x20;
86+
pub const MSG_TRUNC: ::c_int = 0x04;
87+
pub const MSG_CTRUNC: ::c_int = 0x08;
88+
pub const MSG_EOR: c_int = 0x08;
8689

8790
pub const PTHREAD_STACK_MIN: ::size_t = 768;
8891

@@ -100,6 +103,8 @@ extern "C" {
100103
pub fn sendmsg(s: ::c_int, msg: *const ::msghdr, flags: ::c_int) -> ::ssize_t;
101104
#[link_name = "lwip_recvmsg"]
102105
pub fn recvmsg(s: ::c_int, msg: *mut ::msghdr, flags: ::c_int) -> ::ssize_t;
106+
107+
pub fn eventfd(initval: ::c_uint, flags: ::c_int) -> ::c_int;
103108
}
104109

105110
pub use crate::unix::newlib::generic::{sigset_t, stat};

0 commit comments

Comments
 (0)