From 82453b3c3fc97e73d52278b4c605407380063f7d Mon Sep 17 00:00:00 2001 From: Markus Reiter <me@reitermark.us> Date: Mon, 22 Jun 2020 07:21:28 +0200 Subject: [PATCH] Add `MSG_` constants for Xtensa. --- src/unix/newlib/aarch64/mod.rs | 8 ++++++++ src/unix/newlib/arm/mod.rs | 8 ++++++++ src/unix/newlib/mod.rs | 8 -------- src/unix/newlib/xtensa/mod.rs | 8 ++++++++ 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/unix/newlib/aarch64/mod.rs b/src/unix/newlib/aarch64/mod.rs index 3a68bf4b..5d4b46dd 100644 --- a/src/unix/newlib/aarch64/mod.rs +++ b/src/unix/newlib/aarch64/mod.rs @@ -40,3 +40,11 @@ pub const POLLHUP: ::c_short = 0x10; pub const POLLNVAL: ::c_short = 0x20; pub const SOL_SOCKET: ::c_int = 65535; + +pub const MSG_OOB: ::c_int = 1; +pub const MSG_PEEK: ::c_int = 2; +pub const MSG_DONTWAIT: ::c_int = 4; +pub const MSG_DONTROUTE: ::c_int = 0; +pub const MSG_WAITALL: ::c_int = 0; +pub const MSG_MORE: ::c_int = 0; +pub const MSG_NOSIGNAL: ::c_int = 0; diff --git a/src/unix/newlib/arm/mod.rs b/src/unix/newlib/arm/mod.rs index 27274f7a..d322707f 100644 --- a/src/unix/newlib/arm/mod.rs +++ b/src/unix/newlib/arm/mod.rs @@ -42,3 +42,11 @@ pub const POLLOUT: ::c_short = 0x10; pub const POLLNVAL: ::c_short = 0x20; pub const SOL_SOCKET: ::c_int = 65535; + +pub const MSG_OOB: ::c_int = 1; +pub const MSG_PEEK: ::c_int = 2; +pub const MSG_DONTWAIT: ::c_int = 4; +pub const MSG_DONTROUTE: ::c_int = 0; +pub const MSG_WAITALL: ::c_int = 0; +pub const MSG_MORE: ::c_int = 0; +pub const MSG_NOSIGNAL: ::c_int = 0; diff --git a/src/unix/newlib/mod.rs b/src/unix/newlib/mod.rs index 5f53f613..0e22d60b 100644 --- a/src/unix/newlib/mod.rs +++ b/src/unix/newlib/mod.rs @@ -425,14 +425,6 @@ pub const CLOCK_BOOTTIME: ::clockid_t = 4; pub const SOCK_STREAM: ::c_int = 1; pub const SOCK_DGRAM: ::c_int = 2; -pub const MSG_OOB: ::c_int = 1; -pub const MSG_PEEK: ::c_int = 2; -pub const MSG_DONTWAIT: ::c_int = 4; -pub const MSG_DONTROUTE: ::c_int = 0; -pub const MSG_WAITALL: ::c_int = 0; -pub const MSG_MORE: ::c_int = 0; -pub const MSG_NOSIGNAL: ::c_int = 0; - pub const SHUT_RD: ::c_int = 0; pub const SHUT_WR: ::c_int = 1; pub const SHUT_RDWR: ::c_int = 2; diff --git a/src/unix/newlib/xtensa/mod.rs b/src/unix/newlib/xtensa/mod.rs index bf95d9c9..c9803f0b 100644 --- a/src/unix/newlib/xtensa/mod.rs +++ b/src/unix/newlib/xtensa/mod.rs @@ -75,6 +75,14 @@ pub const POLLHUP: ::c_short = 1 << 6; pub const SOL_SOCKET: ::c_int = 0xfff; +pub const MSG_OOB: ::c_int = 0x04; +pub const MSG_PEEK: ::c_int = 0x01; +pub const MSG_DONTWAIT: ::c_int = 0x08; +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; + extern "C" { pub fn sendmsg( s: ::c_int, -- GitLab