Skip to content

Commit 3118fb4

Browse files
authored
Merge pull request #1793 from reitermarkus/xtensa-support-master
Add `MSG_` constants for Xtensa.
2 parents 95d8f48 + 156f82c commit 3118fb4

File tree

4 files changed

+29
-9
lines changed

4 files changed

+29
-9
lines changed

src/unix/newlib/aarch64/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ s! {
3030
}
3131
}
3232

33+
pub const AF_INET6: ::c_int = 23;
34+
3335
pub const FIONBIO: ::c_ulong = 1;
3436

3537
pub const POLLIN: ::c_short = 0x1;
@@ -40,3 +42,11 @@ pub const POLLHUP: ::c_short = 0x10;
4042
pub const POLLNVAL: ::c_short = 0x20;
4143

4244
pub const SOL_SOCKET: ::c_int = 65535;
45+
46+
pub const MSG_OOB: ::c_int = 1;
47+
pub const MSG_PEEK: ::c_int = 2;
48+
pub const MSG_DONTWAIT: ::c_int = 4;
49+
pub const MSG_DONTROUTE: ::c_int = 0;
50+
pub const MSG_WAITALL: ::c_int = 0;
51+
pub const MSG_MORE: ::c_int = 0;
52+
pub const MSG_NOSIGNAL: ::c_int = 0;

src/unix/newlib/arm/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ s! {
3232
}
3333
}
3434

35+
pub const AF_INET6: ::c_int = 23;
36+
3537
pub const FIONBIO: ::c_ulong = 1;
3638

3739
pub const POLLIN: ::c_short = 0x1;
@@ -42,3 +44,11 @@ pub const POLLOUT: ::c_short = 0x10;
4244
pub const POLLNVAL: ::c_short = 0x20;
4345

4446
pub const SOL_SOCKET: ::c_int = 65535;
47+
48+
pub const MSG_OOB: ::c_int = 1;
49+
pub const MSG_PEEK: ::c_int = 2;
50+
pub const MSG_DONTWAIT: ::c_int = 4;
51+
pub const MSG_DONTROUTE: ::c_int = 0;
52+
pub const MSG_WAITALL: ::c_int = 0;
53+
pub const MSG_MORE: ::c_int = 0;
54+
pub const MSG_NOSIGNAL: ::c_int = 0;

src/unix/newlib/mod.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,6 @@ pub const PF_INET6: ::c_int = 23;
416416

417417
pub const AF_UNSPEC: ::c_int = 0;
418418
pub const AF_INET: ::c_int = 2;
419-
pub const AF_INET6: ::c_int = 23;
420419

421420
pub const CLOCK_REALTIME: ::clockid_t = 1;
422421
pub const CLOCK_MONOTONIC: ::clockid_t = 4;
@@ -425,14 +424,6 @@ pub const CLOCK_BOOTTIME: ::clockid_t = 4;
425424
pub const SOCK_STREAM: ::c_int = 1;
426425
pub const SOCK_DGRAM: ::c_int = 2;
427426

428-
pub const MSG_OOB: ::c_int = 1;
429-
pub const MSG_PEEK: ::c_int = 2;
430-
pub const MSG_DONTWAIT: ::c_int = 4;
431-
pub const MSG_DONTROUTE: ::c_int = 0;
432-
pub const MSG_WAITALL: ::c_int = 0;
433-
pub const MSG_MORE: ::c_int = 0;
434-
pub const MSG_NOSIGNAL: ::c_int = 0;
435-
436427
pub const SHUT_RD: ::c_int = 0;
437428
pub const SHUT_WR: ::c_int = 1;
438429
pub const SHUT_RDWR: ::c_int = 2;

src/unix/newlib/xtensa/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ s! {
6060
}
6161

6262
pub const AF_UNIX: ::c_int = 1;
63+
pub const AF_INET6: ::c_int = 10;
6364

6465
pub const FIONBIO: ::c_ulong = 2147772030;
6566

@@ -75,6 +76,14 @@ pub const POLLHUP: ::c_short = 1 << 6;
7576

7677
pub const SOL_SOCKET: ::c_int = 0xfff;
7778

79+
pub const MSG_OOB: ::c_int = 0x04;
80+
pub const MSG_PEEK: ::c_int = 0x01;
81+
pub const MSG_DONTWAIT: ::c_int = 0x08;
82+
pub const MSG_DONTROUTE: ::c_int = 0x4;
83+
pub const MSG_WAITALL: ::c_int = 0x02;
84+
pub const MSG_MORE: ::c_int = 0x10;
85+
pub const MSG_NOSIGNAL: ::c_int = 0x20;
86+
7887
extern "C" {
7988
pub fn sendmsg(
8089
s: ::c_int,

0 commit comments

Comments
 (0)