Skip to content

Commit fa7bb69

Browse files
authored
Merge pull request #3876 from tgross35/backport-chives
[0.2] Backport of three pull requests
2 parents 99bd0f5 + adafc28 commit fa7bb69

File tree

8 files changed

+25
-22
lines changed

8 files changed

+25
-22
lines changed

libc-test/semver/openbsd.txt

+3
Original file line numberDiff line numberDiff line change
@@ -1137,6 +1137,7 @@ mknodat
11371137
mkostemp
11381138
mkostemps
11391139
mkstemps
1140+
mmsghdr
11401141
mount_info
11411142
mrand48
11421143
msdosfs_args
@@ -1216,6 +1217,7 @@ readlinkat
12161217
reallocarray
12171218
reboot
12181219
recvmsg
1220+
recvmmsg
12191221
regcomp
12201222
regerror
12211223
regex_t
@@ -1237,6 +1239,7 @@ sem_init
12371239
sem_open
12381240
sem_timedwait
12391241
sem_unlink
1242+
sendmmsg
12401243
sendmsg
12411244
setdomainname
12421245
setgrent

src/unix/bsd/netbsdlike/mod.rs

+19
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ s! {
9292
pub piod_addr: *mut ::c_void,
9393
pub piod_len: ::size_t,
9494
}
95+
96+
pub struct mmsghdr {
97+
pub msg_hdr: ::msghdr,
98+
pub msg_len: ::c_uint,
99+
}
95100
}
96101

97102
pub const D_T_FMT: ::nl_item = 0;
@@ -848,6 +853,20 @@ extern "C" {
848853
pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
849854
pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
850855
pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int;
856+
857+
pub fn sendmmsg(
858+
sockfd: ::c_int,
859+
mmsg: *mut ::mmsghdr,
860+
vlen: ::c_uint,
861+
flags: ::c_int,
862+
) -> ::c_int;
863+
pub fn recvmmsg(
864+
sockfd: ::c_int,
865+
mmsg: *mut ::mmsghdr,
866+
vlen: ::c_uint,
867+
flags: ::c_int,
868+
timeout: *mut ::timespec,
869+
) -> ::c_int;
851870
}
852871

853872
cfg_if! {

src/unix/bsd/netbsdlike/netbsd/mod.rs

-19
Original file line numberDiff line numberDiff line change
@@ -401,11 +401,6 @@ s! {
401401
pub sdl_data: [::c_char; 12],
402402
}
403403

404-
pub struct mmsghdr {
405-
pub msg_hdr: ::msghdr,
406-
pub msg_len: ::c_uint,
407-
}
408-
409404
pub struct __exit_status {
410405
pub e_termination: u16,
411406
pub e_exit: u16,
@@ -2781,20 +2776,6 @@ extern "C" {
27812776

27822777
pub fn kqueue1(flags: ::c_int) -> ::c_int;
27832778

2784-
pub fn sendmmsg(
2785-
sockfd: ::c_int,
2786-
msgvec: *mut ::mmsghdr,
2787-
vlen: ::c_uint,
2788-
flags: ::c_int,
2789-
) -> ::c_int;
2790-
pub fn recvmmsg(
2791-
sockfd: ::c_int,
2792-
msgvec: *mut ::mmsghdr,
2793-
vlen: ::c_uint,
2794-
flags: ::c_int,
2795-
timeout: *mut ::timespec,
2796-
) -> ::c_int;
2797-
27982779
pub fn _lwp_self() -> lwpid_t;
27992780
pub fn memmem(
28002781
haystack: *const ::c_void,

src/unix/linux_like/linux/gnu/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1405,7 +1405,6 @@ extern "C" {
14051405
pub fn reallocarray(ptr: *mut ::c_void, nmemb: ::size_t, size: ::size_t) -> *mut ::c_void;
14061406

14071407
pub fn ctermid(s: *mut ::c_char) -> *mut ::c_char;
1408-
pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
14091408
pub fn backtrace(buf: *mut *mut ::c_void, sz: ::c_int) -> ::c_int;
14101409
pub fn glob64(
14111410
pattern: *const ::c_char,

src/unix/linux_like/linux/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -5635,6 +5635,8 @@ extern "C" {
56355635
) -> ::ssize_t;
56365636

56375637
pub fn klogctl(syslog_type: ::c_int, bufp: *mut ::c_char, len: ::c_int) -> ::c_int;
5638+
5639+
pub fn ioctl(fd: ::c_int, request: ::Ioctl, ...) -> ::c_int;
56385640
}
56395641

56405642
// LFS64 extensions

src/unix/linux_like/linux/musl/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,6 @@ extern "C" {
853853
new_limit: *const ::rlimit,
854854
old_limit: *mut ::rlimit,
855855
) -> ::c_int;
856-
pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
857856
pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int;
858857
pub fn ptrace(request: ::c_int, ...) -> ::c_long;
859858
pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int;

src/unix/linux_like/linux/uclibc/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,6 @@ pub const UDP_SEGMENT: ::c_int = 103;
353353
pub const YESEXPR: ::c_int = ((5) << 8) | (0);
354354

355355
extern "C" {
356-
pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
357356
pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int;
358357

359358
pub fn pthread_rwlockattr_getkind_np(

src/vxworks/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,7 @@ pub const S_IFSOCK: ::c_int = 0xc000;
782782
pub const S_ISUID: ::c_int = 0x0800;
783783
pub const S_ISGID: ::c_int = 0x0400;
784784
pub const S_ISTXT: ::c_int = 0x0200;
785+
pub const S_ISVTX: ::c_int = 0o1000;
785786
pub const S_IRUSR: ::c_int = 0x0100;
786787
pub const S_IWUSR: ::c_int = 0x0080;
787788
pub const S_IXUSR: ::c_int = 0x0040;

0 commit comments

Comments
 (0)