Add sendmsg stub

This commit is contained in:
Jeremy Soller
2024-01-12 15:36:01 -07:00
parent eb3b93d14a
commit 52612784b6
6 changed files with 37 additions and 8 deletions
+5 -1
View File
@@ -2,7 +2,7 @@ use super::{
super::{types::*, PalSocket},
e, Sys,
};
use crate::header::sys_socket::{sockaddr, socklen_t};
use crate::header::sys_socket::{msghdr, sockaddr, socklen_t};
impl PalSocket for Sys {
unsafe fn accept(socket: c_int, address: *mut sockaddr, address_len: *mut socklen_t) -> c_int {
@@ -75,6 +75,10 @@ impl PalSocket for Sys {
)) as ssize_t
}
unsafe fn sendmsg(socket: c_int, msg: *const msghdr, flags: c_int) -> ssize_t {
e(syscall!(SENDMSG, socket, msg, flags)) as ssize_t
}
unsafe fn sendto(
socket: c_int,
buf: *const c_void,