summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-08-09 11:21:30 +0000
committerbors <bors@rust-lang.org>2022-08-09 11:21:30 +0000
commit1f28e05a858fd535262f6372f7b5b64d37ffd941 (patch)
tree7bc7ba67314d0043c780375c7fd1da0f6cf09b28
parent4b7908f0b174e95d28f151ae31585c0a189c35ce (diff)
parent919e823d2e310265a5791151cc927b577387e82e (diff)
downloadrust-libc-1f28e05a858fd535262f6372f7b5b64d37ffd941.tar.gz
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](https://github.com/rust-lang/socket2/compare/master...esp-rs-compat:socket2:master#diff-bbdb7821e30b05ce3afbaa9fbc1526c18d6670d65479baaca3beaf4ea6174891R80) and [this](https://github.com/rust-lang/socket2/compare/master...esp-rs-compat:socket2:master#diff-bbdb7821e30b05ce3afbaa9fbc1526c18d6670d65479baaca3beaf4ea6174891R413) TODOs I need these constants defined in the `libc` crate
-rw-r--r--src/unix/newlib/espidf/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/unix/newlib/espidf/mod.rs b/src/unix/newlib/espidf/mod.rs
index 38c99c6b35..96e604c674 100644
--- a/src/unix/newlib/espidf/mod.rs
+++ b/src/unix/newlib/espidf/mod.rs
@@ -83,6 +83,9 @@ pub const MSG_DONTROUTE: ::c_int = 0x4;
pub const MSG_WAITALL: ::c_int = 0x02;
pub const MSG_MORE: ::c_int = 0x10;
pub const MSG_NOSIGNAL: ::c_int = 0x20;
+pub const MSG_TRUNC: ::c_int = 0x04;
+pub const MSG_CTRUNC: ::c_int = 0x08;
+pub const MSG_EOR: c_int = 0x08;
pub const PTHREAD_STACK_MIN: ::size_t = 768;
@@ -100,6 +103,8 @@ extern "C" {
pub fn sendmsg(s: ::c_int, msg: *const ::msghdr, flags: ::c_int) -> ::ssize_t;
#[link_name = "lwip_recvmsg"]
pub fn recvmsg(s: ::c_int, msg: *mut ::msghdr, flags: ::c_int) -> ::ssize_t;
+
+ pub fn eventfd(initval: ::c_uint, flags: ::c_int) -> ::c_int;
}
pub use crate::unix::newlib::generic::{sigset_t, stat};