Skip to content

Commit 31f746a

Browse files
authored
Merge pull request #3980 from tgross35/backport-squash
[0.2] Backports
2 parents c49fe92 + f39e871 commit 31f746a

File tree

20 files changed

+397
-43
lines changed

20 files changed

+397
-43
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,14 @@ targets = [
8585
"riscv32i-unknown-none-elf",
8686
"riscv32imac-unknown-none-elf",
8787
"riscv32imc-unknown-none-elf",
88+
"riscv32-wrs-vxworks",
8889
"riscv64gc-unknown-freebsd",
8990
"riscv64gc-unknown-hermit",
9091
"riscv64gc-unknown-linux-gnu",
9192
"riscv64gc-unknown-linux-musl",
9293
"riscv64gc-unknown-none-elf",
9394
"riscv64imac-unknown-none-elf",
95+
"riscv64-wrs-vxworks",
9496
"s390x-unknown-linux-gnu",
9597
"s390x-unknown-linux-musl",
9698
"sparc-unknown-linux-gnu",

ci/build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,13 @@ riscv32i-unknown-none-elf \
252252
riscv32imac-unknown-none-elf \
253253
riscv32imc-unknown-none-elf \
254254
riscv32gc-unknown-linux-gnu \
255+
riscv32-wrs-vxworks \
255256
riscv64gc-unknown-freebsd \
256257
riscv64gc-unknown-hermit \
257258
riscv64gc-unknown-linux-musl \
258259
riscv64gc-unknown-none-elf \
259260
riscv64imac-unknown-none-elf \
261+
riscv64-wrs-vxworks \
260262
s390x-unknown-linux-musl \
261263
sparc-unknown-linux-gnu \
262264
sparc64-unknown-netbsd \

libc-test/semver/dragonfly.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,31 @@ RLIMIT_STACK
874874
RLIMIT_VMEM
875875
RLIM_INFINITY
876876
RLIM_NLIMITS
877+
RTF_XRESOLVE
878+
RTF_LLINFO
879+
RTF_PROTO3
880+
RTF_PINNED
881+
RTF_LOCAL
882+
RTF_BROADCAST
883+
RTF_MULTICAST
884+
RTM_LOCK
885+
RTM_RESOLVE
886+
RTM_NEWADDR
887+
RTM_DELADDR
888+
RTM_IFINFO
889+
RTM_NEWMADDR
890+
RTM_DELMADDR
891+
RTM_IFANNOUNCE
892+
RTM_IEEE80211
893+
RTF_CLONING
894+
RTF_PRCLONING
895+
RTF_WASCLONED
896+
RTF_MPLSOPS
897+
RTM_VERSION
898+
RTAX_MPLS1
899+
RTAX_MPLS2
900+
RTAX_MPLS3
901+
RTAX_MAX
877902
RTLD_NEXT
878903
RTLD_NODELETE
879904
RTLD_NOLOAD

libc-test/semver/freebsd.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,6 +1023,7 @@ PL_FLAG_SI
10231023
PM_STR
10241024
POLLINIGNEOF
10251025
POLLRDBAND
1026+
POLLRDHUP
10261027
POLLRDNORM
10271028
POLLSTANDARD
10281029
POLLWRBAND
@@ -1218,6 +1219,26 @@ RLIMIT_UMTXP
12181219
RLIMIT_VMEM
12191220
RLIM_INFINITY
12201221
RLIM_NLIMITS
1222+
RTF_XRESOLVE
1223+
RTF_LLINFO
1224+
RTF_PROTO3
1225+
RTF_PINNED
1226+
RTF_LOCAL
1227+
RTF_BROADCAST
1228+
RTF_MULTICAST
1229+
RTM_LOCK
1230+
RTM_RESOLVE
1231+
RTM_NEWADDR
1232+
RTM_DELADDR
1233+
RTM_IFINFO
1234+
RTM_NEWMADDR
1235+
RTM_DELMADDR
1236+
RTM_IFANNOUNCE
1237+
RTM_IEEE80211
1238+
RTF_LLDATA
1239+
RTF_FIXEDMTU
1240+
RTM_VERSION
1241+
RTAX_MAX
12211242
RTLD_NEXT
12221243
RTLD_NODELETE
12231244
RTLD_NOLOAD

libc-test/semver/illumos.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
O_RSYNC
2+
POLLRDHUP
3+
POSIX_FADV_DONTNEED
4+
POSIX_FADV_NOREUSE
5+
POSIX_FADV_NORMAL
6+
POSIX_FADV_RANDOM
7+
POSIX_FADV_SEQUENTIAL
8+
POSIX_FADV_WILLNEED
9+
posix_fadvise
10+
posix_fallocate
111
pthread_attr_get_np
212
pthread_attr_getstackaddr
313
pthread_attr_setstack
14+
ptsname_r

libc-test/semver/linux-musl.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# TODO: musl.
21
AF_IB
32
AF_MPLS
43
AF_XDP

libc-test/semver/netbsd.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ CLD_EXITED
136136
CLD_KILLED
137137
CLD_STOPPED
138138
CLD_TRAPPED
139+
CLOCK_PROCESS_CPUTIME_ID
140+
CLOCK_THREAD_CPUTIME_ID
139141
CMSG_DATA
140142
CMSG_FIRSTHDR
141143
CMSG_LEN
@@ -927,6 +929,28 @@ RLIM_INFINITY
927929
RLIM_NLIMITS
928930
RLIM_SAVED_CUR
929931
RLIM_SAVED_MAX
932+
RTF_MASK
933+
RTF_CONNECTED
934+
RTF_ANNOUNCE
935+
RTF_SRC
936+
RTF_LOCAL
937+
RTF_BROADCAST
938+
RTF_UPDATING
939+
RTF_DONTCHANGEIFA
940+
RTM_VERSION
941+
RTM_LOCK
942+
RTM_IFANNOUNCE
943+
RTM_IEEE80211
944+
RTM_SETGATE
945+
RTM_LLINFO_UPD
946+
RTM_IFINFO
947+
RTM_OCHGADDR
948+
RTM_NEWADDR
949+
RTM_DELADDR
950+
RTM_CHGADDR
951+
RTA_TAG
952+
RTAX_TAG
953+
RTAX_MAX
930954
RTLD_NEXT
931955
RTLD_NOLOAD
932956
RTLD_SELF
@@ -1567,6 +1591,7 @@ sync
15671591
syscall
15681592
sysctl
15691593
sysctlbyname
1594+
sysctlnametomib
15701595
sysctldesc
15711596
tcp_info
15721597
telldir

libc-test/semver/openbsd.txt

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,8 +765,50 @@ RLIM_INFINITY
765765
RLIM_NLIMITS
766766
RLIM_SAVED_CUR
767767
RLIM_SAVED_MAX
768+
RTA_BFD
769+
RTA_DNS
770+
RTA_LABEL
771+
RTA_SEARCH
772+
RTA_SRC
773+
RTA_SRCMASK
774+
RTA_STATIC
775+
RTAX_BFD
776+
RTAX_DNS
777+
RTAX_LABEL
778+
RTAX_MAX
779+
RTAX_SEARCH
780+
RTAX_SRC
781+
RTAX_SRCMASK
782+
RTAX_STATIC
783+
RTF_ANNOUNCE
784+
RTF_BFD
785+
RTF_BROADCAST
786+
RTF_CACHED
787+
RTF_CLONED
788+
RTF_CLONING
789+
RTF_CONNECTED
790+
RTF_FMASK
791+
RTF_LLINFO
792+
RTF_LOCAL
793+
RTF_MPATH
794+
RTF_MPLS
795+
RTF_MULTICAST
796+
RTF_PROTO3
768797
RTLD_NEXT
769798
RTLD_SELF
799+
RTM_80211INFO
800+
RTM_BFD
801+
RTM_CHGADDRATTR
802+
RTM_DELADDR
803+
RTM_DESYNC
804+
RTM_IFANNOUNCE
805+
RTM_IFINFO
806+
RTM_INVALIDATE
807+
RTM_NEWADDR
808+
RTM_PROPOSAL
809+
RTM_RESOLVE
810+
RTM_SOURCE
811+
RTM_VERSION
770812
RUSAGE_CHILDREN
771813
RUSAGE_SELF
772814
RUSAGE_THREAD

src/unix/bsd/apple/mod.rs

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4940,22 +4940,11 @@ pub const XATTR_SHOWCOMPRESSION: ::c_int = 0x0020;
49404940
pub const NET_RT_IFLIST2: ::c_int = 0x0006;
49414941

49424942
// net/route.h
4943-
pub const RTF_UP: ::c_int = 0x1;
4944-
pub const RTF_GATEWAY: ::c_int = 0x2;
4945-
pub const RTF_HOST: ::c_int = 0x4;
4946-
pub const RTF_REJECT: ::c_int = 0x8;
4947-
pub const RTF_DYNAMIC: ::c_int = 0x10;
4948-
pub const RTF_MODIFIED: ::c_int = 0x20;
4949-
pub const RTF_DONE: ::c_int = 0x40;
49504943
pub const RTF_DELCLONE: ::c_int = 0x80;
49514944
pub const RTF_CLONING: ::c_int = 0x100;
49524945
pub const RTF_XRESOLVE: ::c_int = 0x200;
49534946
pub const RTF_LLINFO: ::c_int = 0x400;
4954-
pub const RTF_STATIC: ::c_int = 0x800;
4955-
pub const RTF_BLACKHOLE: ::c_int = 0x1000;
49564947
pub const RTF_NOIFREF: ::c_int = 0x2000;
4957-
pub const RTF_PROTO2: ::c_int = 0x4000;
4958-
pub const RTF_PROTO1: ::c_int = 0x8000;
49594948
pub const RTF_PRCLONING: ::c_int = 0x10000;
49604949
pub const RTF_WASCLONED: ::c_int = 0x20000;
49614950
pub const RTF_PROTO3: ::c_int = 0x40000;
@@ -4974,13 +4963,6 @@ pub const RTF_GLOBAL: ::c_int = 0x40000000;
49744963
pub const RTM_VERSION: ::c_int = 5;
49754964

49764965
// Message types
4977-
pub const RTM_ADD: ::c_int = 0x1;
4978-
pub const RTM_DELETE: ::c_int = 0x2;
4979-
pub const RTM_CHANGE: ::c_int = 0x3;
4980-
pub const RTM_GET: ::c_int = 0x4;
4981-
pub const RTM_LOSING: ::c_int = 0x5;
4982-
pub const RTM_REDIRECT: ::c_int = 0x6;
4983-
pub const RTM_MISS: ::c_int = 0x7;
49844966
pub const RTM_LOCK: ::c_int = 0x8;
49854967
pub const RTM_OLDADD: ::c_int = 0x9;
49864968
pub const RTM_OLDDEL: ::c_int = 0xa;
@@ -5004,25 +4986,6 @@ pub const RTV_SSTHRESH: ::c_int = 0x20;
50044986
pub const RTV_RTT: ::c_int = 0x40;
50054987
pub const RTV_RTTVAR: ::c_int = 0x80;
50064988

5007-
// Bitmask values for rtm_addrs.
5008-
pub const RTA_DST: ::c_int = 0x1;
5009-
pub const RTA_GATEWAY: ::c_int = 0x2;
5010-
pub const RTA_NETMASK: ::c_int = 0x4;
5011-
pub const RTA_GENMASK: ::c_int = 0x8;
5012-
pub const RTA_IFP: ::c_int = 0x10;
5013-
pub const RTA_IFA: ::c_int = 0x20;
5014-
pub const RTA_AUTHOR: ::c_int = 0x40;
5015-
pub const RTA_BRD: ::c_int = 0x80;
5016-
5017-
// Index offsets for sockaddr array for alternate internal encoding.
5018-
pub const RTAX_DST: ::c_int = 0;
5019-
pub const RTAX_GATEWAY: ::c_int = 1;
5020-
pub const RTAX_NETMASK: ::c_int = 2;
5021-
pub const RTAX_GENMASK: ::c_int = 3;
5022-
pub const RTAX_IFP: ::c_int = 4;
5023-
pub const RTAX_IFA: ::c_int = 5;
5024-
pub const RTAX_AUTHOR: ::c_int = 6;
5025-
pub const RTAX_BRD: ::c_int = 7;
50264989
pub const RTAX_MAX: ::c_int = 8;
50274990

50284991
pub const KERN_PROCARGS2: ::c_int = 49;

src/unix/bsd/freebsdlike/dragonfly/mod.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,6 +1522,19 @@ pub const NGROUPS: usize = 16;
15221522
pub const RB_PAUSE: ::c_int = 0x40000;
15231523
pub const RB_VIDEO: ::c_int = 0x20000000;
15241524

1525+
// net/route.h
1526+
pub const RTF_CLONING: ::c_int = 0x100;
1527+
pub const RTF_PRCLONING: ::c_int = 0x10000;
1528+
pub const RTF_WASCLONED: ::c_int = 0x20000;
1529+
pub const RTF_MPLSOPS: ::c_int = 0x1000000;
1530+
1531+
pub const RTM_VERSION: ::c_int = 7;
1532+
1533+
pub const RTAX_MPLS1: ::c_int = 8;
1534+
pub const RTAX_MPLS2: ::c_int = 9;
1535+
pub const RTAX_MPLS3: ::c_int = 10;
1536+
pub const RTAX_MAX: ::c_int = 11;
1537+
15251538
const_fn! {
15261539
{const} fn _CMSG_ALIGN(n: usize) -> usize {
15271540
(n + (::mem::size_of::<::c_long>() - 1)) & !(::mem::size_of::<::c_long>() - 1)

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2894,6 +2894,7 @@ pub const POSIX_FADV_DONTNEED: ::c_int = 4;
28942894
pub const POSIX_FADV_NOREUSE: ::c_int = 5;
28952895

28962896
pub const POLLINIGNEOF: ::c_short = 0x2000;
2897+
pub const POLLRDHUP: ::c_short = 0x4000;
28972898

28982899
pub const EVFILT_READ: i16 = -1;
28992900
pub const EVFILT_WRITE: i16 = -2;
@@ -4742,6 +4743,14 @@ pub const CPU_WHICH_CPUSET: ::c_int = 3;
47424743
pub const CPU_WHICH_IRQ: ::c_int = 4;
47434744
pub const CPU_WHICH_JAIL: ::c_int = 5;
47444745

4746+
// net/route.h
4747+
pub const RTF_LLDATA: ::c_int = 0x400;
4748+
pub const RTF_FIXEDMTU: ::c_int = 0x80000;
4749+
4750+
pub const RTM_VERSION: ::c_int = 5;
4751+
4752+
pub const RTAX_MAX: ::c_int = 8;
4753+
47454754
// sys/signal.h
47464755
pub const SIGTHR: ::c_int = 32;
47474756
pub const SIGLWP: ::c_int = SIGTHR;

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,6 +1017,25 @@ pub const SO_TYPE: ::c_int = 0x1008;
10171017

10181018
pub const LOCAL_PEERCRED: ::c_int = 1;
10191019

1020+
// net/route.h
1021+
pub const RTF_XRESOLVE: ::c_int = 0x200;
1022+
pub const RTF_LLINFO: ::c_int = 0x400;
1023+
pub const RTF_PROTO3: ::c_int = 0x40000;
1024+
pub const RTF_PINNED: ::c_int = 0x100000;
1025+
pub const RTF_LOCAL: ::c_int = 0x200000;
1026+
pub const RTF_BROADCAST: ::c_int = 0x400000;
1027+
pub const RTF_MULTICAST: ::c_int = 0x800000;
1028+
1029+
pub const RTM_LOCK: ::c_int = 0x8;
1030+
pub const RTM_RESOLVE: ::c_int = 0xb;
1031+
pub const RTM_NEWADDR: ::c_int = 0xc;
1032+
pub const RTM_DELADDR: ::c_int = 0xd;
1033+
pub const RTM_IFINFO: ::c_int = 0xe;
1034+
pub const RTM_NEWMADDR: ::c_int = 0xf;
1035+
pub const RTM_DELMADDR: ::c_int = 0x10;
1036+
pub const RTM_IFANNOUNCE: ::c_int = 0x11;
1037+
pub const RTM_IEEE80211: ::c_int = 0x12;
1038+
10201039
pub const SHUT_RD: ::c_int = 0;
10211040
pub const SHUT_WR: ::c_int = 1;
10221041
pub const SHUT_RDWR: ::c_int = 2;

src/unix/bsd/mod.rs

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,49 @@ pub const ITIMER_REAL: ::c_int = 0;
543543
pub const ITIMER_VIRTUAL: ::c_int = 1;
544544
pub const ITIMER_PROF: ::c_int = 2;
545545

546+
// net/route.h
547+
548+
pub const RTF_UP: ::c_int = 0x1;
549+
pub const RTF_GATEWAY: ::c_int = 0x2;
550+
pub const RTF_HOST: ::c_int = 0x4;
551+
pub const RTF_REJECT: ::c_int = 0x8;
552+
pub const RTF_DYNAMIC: ::c_int = 0x10;
553+
pub const RTF_MODIFIED: ::c_int = 0x20;
554+
pub const RTF_DONE: ::c_int = 0x40;
555+
pub const RTF_STATIC: ::c_int = 0x800;
556+
pub const RTF_BLACKHOLE: ::c_int = 0x1000;
557+
pub const RTF_PROTO2: ::c_int = 0x4000;
558+
pub const RTF_PROTO1: ::c_int = 0x8000;
559+
560+
// Message types
561+
pub const RTM_ADD: ::c_int = 0x1;
562+
pub const RTM_DELETE: ::c_int = 0x2;
563+
pub const RTM_CHANGE: ::c_int = 0x3;
564+
pub const RTM_GET: ::c_int = 0x4;
565+
pub const RTM_LOSING: ::c_int = 0x5;
566+
pub const RTM_REDIRECT: ::c_int = 0x6;
567+
pub const RTM_MISS: ::c_int = 0x7;
568+
569+
// Bitmask values for rtm_addrs.
570+
pub const RTA_DST: ::c_int = 0x1;
571+
pub const RTA_GATEWAY: ::c_int = 0x2;
572+
pub const RTA_NETMASK: ::c_int = 0x4;
573+
pub const RTA_GENMASK: ::c_int = 0x8;
574+
pub const RTA_IFP: ::c_int = 0x10;
575+
pub const RTA_IFA: ::c_int = 0x20;
576+
pub const RTA_AUTHOR: ::c_int = 0x40;
577+
pub const RTA_BRD: ::c_int = 0x80;
578+
579+
// Index offsets for sockaddr array for alternate internal encoding.
580+
pub const RTAX_DST: ::c_int = 0;
581+
pub const RTAX_GATEWAY: ::c_int = 1;
582+
pub const RTAX_NETMASK: ::c_int = 2;
583+
pub const RTAX_GENMASK: ::c_int = 3;
584+
pub const RTAX_IFP: ::c_int = 4;
585+
pub const RTAX_IFA: ::c_int = 5;
586+
pub const RTAX_AUTHOR: ::c_int = 6;
587+
pub const RTAX_BRD: ::c_int = 7;
588+
546589
f! {
547590
pub fn CMSG_FIRSTHDR(mhdr: *const ::msghdr) -> *mut ::cmsghdr {
548591
if (*mhdr).msg_controllen as usize >= ::mem::size_of::<::cmsghdr>() {

0 commit comments

Comments
 (0)