diff options
Diffstat (limited to 'sys/compat/linux/linux_socket.c')
-rw-r--r-- | sys/compat/linux/linux_socket.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 08a287b..ef3b2c1 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -483,6 +483,8 @@ bsd_to_linux_cmsg_type(int cmsg_type) return (LINUX_SCM_RIGHTS); case SCM_CREDS: return (LINUX_SCM_CREDENTIALS); + case SCM_TIMESTAMP: + return (LINUX_SCM_TIMESTAMP); } return (-1); } @@ -1221,6 +1223,8 @@ linux_recvmsg_common(struct thread *td, l_int s, struct l_msghdr *msghdr, struct iovec *iov, *uiov; struct mbuf *control = NULL; struct mbuf **controlp; + struct timeval *ftmvl; + l_timeval ltmvl; caddr_t outbuf; void *data; int error, i, fd, fds, *fdp; @@ -1331,6 +1335,18 @@ linux_recvmsg_common(struct thread *td, l_int s, struct l_msghdr *msghdr, data = &linux_ucred; datalen = sizeof(linux_ucred); break; + + case SCM_TIMESTAMP: + if (datalen != sizeof(struct timeval)) { + error = EMSGSIZE; + goto bad; + } + ftmvl = (struct timeval *)data; + ltmvl.tv_sec = ftmvl->tv_sec; + ltmvl.tv_usec = ftmvl->tv_usec; + data = <mvl; + datalen = sizeof(ltmvl); + break; } if (outlen + LINUX_CMSG_LEN(datalen) > |