mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-18 13:23:20 +08:00
Update to FreeBSD head 2017-04-04
Git mirror commit 642b174daddbd0efd9bb5f242c43f4ab4db6869f.
This commit is contained in:
@@ -842,6 +842,9 @@ uipc_listen(struct socket *so, int backlog, struct thread *td)
|
||||
struct unpcb *unp;
|
||||
int error;
|
||||
|
||||
if (so->so_type != SOCK_STREAM && so->so_type != SOCK_SEQPACKET)
|
||||
return (EOPNOTSUPP);
|
||||
|
||||
unp = sotounpcb(so);
|
||||
KASSERT(unp != NULL, ("uipc_listen: unp == NULL"));
|
||||
|
||||
@@ -2058,6 +2061,7 @@ unp_internalize(struct mbuf **controlp, struct thread *td)
|
||||
struct filedescent *fde, **fdep, *fdev;
|
||||
struct file *fp;
|
||||
struct timeval *tv;
|
||||
struct timespec *ts;
|
||||
int i, *fdp;
|
||||
void *data;
|
||||
socklen_t clen = control->m_len, datalen;
|
||||
@@ -2178,6 +2182,30 @@ unp_internalize(struct mbuf **controlp, struct thread *td)
|
||||
bintime(bt);
|
||||
break;
|
||||
|
||||
case SCM_REALTIME:
|
||||
*controlp = sbcreatecontrol(NULL, sizeof(*ts),
|
||||
SCM_REALTIME, SOL_SOCKET);
|
||||
if (*controlp == NULL) {
|
||||
error = ENOBUFS;
|
||||
goto out;
|
||||
}
|
||||
ts = (struct timespec *)
|
||||
CMSG_DATA(mtod(*controlp, struct cmsghdr *));
|
||||
nanotime(ts);
|
||||
break;
|
||||
|
||||
case SCM_MONOTONIC:
|
||||
*controlp = sbcreatecontrol(NULL, sizeof(*ts),
|
||||
SCM_MONOTONIC, SOL_SOCKET);
|
||||
if (*controlp == NULL) {
|
||||
error = ENOBUFS;
|
||||
goto out;
|
||||
}
|
||||
ts = (struct timespec *)
|
||||
CMSG_DATA(mtod(*controlp, struct cmsghdr *));
|
||||
nanouptime(ts);
|
||||
break;
|
||||
|
||||
default:
|
||||
error = EINVAL;
|
||||
goto out;
|
||||
|
Reference in New Issue
Block a user