summaryrefslogtreecommitdiffstats
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index d182890ff0..34760779c8 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -51,12 +51,15 @@
#include <sys/sysinfo.h>
#include <sys/signalfd.h>
//#include <sys/user.h>
+#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
+#include <netinet/udp.h>
#include <linux/wireless.h>
#include <linux/icmp.h>
#include <linux/icmpv6.h>
#include <linux/if_tun.h>
+#include <linux/in6.h>
#include <linux/errqueue.h>
#include <linux/random.h>
#ifdef CONFIG_TIMERFD
@@ -2184,7 +2187,8 @@ static abi_long do_setsockopt(int sockfd, int level, int optname,
switch(level) {
case SOL_TCP:
- /* TCP options all take an 'int' value. */
+ case SOL_UDP:
+ /* TCP and UDP options all take an 'int' value. */
if (optlen < sizeof(uint32_t))
return -TARGET_EINVAL;
@@ -2270,6 +2274,7 @@ static abi_long do_setsockopt(int sockfd, int level, int optname,
case IPV6_RECVDSTOPTS:
case IPV6_2292DSTOPTS:
case IPV6_TCLASS:
+ case IPV6_ADDR_PREFERENCES:
#ifdef IPV6_RECVPATHMTU
case IPV6_RECVPATHMTU:
#endif
@@ -2832,7 +2837,8 @@ get_timeout:
}
break;
case SOL_TCP:
- /* TCP options all take an 'int' value. */
+ case SOL_UDP:
+ /* TCP and UDP options all take an 'int' value. */
int_case:
if (get_user_u32(len, optlen))
return -TARGET_EFAULT;
@@ -2923,6 +2929,7 @@ get_timeout:
case IPV6_RECVDSTOPTS:
case IPV6_2292DSTOPTS:
case IPV6_TCLASS:
+ case IPV6_ADDR_PREFERENCES:
#ifdef IPV6_RECVPATHMTU
case IPV6_RECVPATHMTU:
#endif
@@ -6640,6 +6647,14 @@ static int target_to_host_fcntl_cmd(int cmd)
ret = F_GETPIPE_SZ;
break;
#endif
+#ifdef F_ADD_SEALS
+ case TARGET_F_ADD_SEALS:
+ ret = F_ADD_SEALS;
+ break;
+ case TARGET_F_GET_SEALS:
+ ret = F_GET_SEALS;
+ break;
+#endif
default:
ret = -TARGET_EINVAL;
break;
@@ -6664,8 +6679,6 @@ static int target_to_host_fcntl_cmd(int cmd)
TRANSTBL_CONVERT(F_RDLCK); \
TRANSTBL_CONVERT(F_WRLCK); \
TRANSTBL_CONVERT(F_UNLCK); \
- TRANSTBL_CONVERT(F_EXLCK); \
- TRANSTBL_CONVERT(F_SHLCK); \
}
static int target_to_host_flock(int type)
@@ -6931,6 +6944,8 @@ static abi_long do_fcntl(int fd, int cmd, abi_ulong arg)
case TARGET_F_GETLEASE:
case TARGET_F_SETPIPE_SZ:
case TARGET_F_GETPIPE_SZ:
+ case TARGET_F_ADD_SEALS:
+ case TARGET_F_GET_SEALS:
ret = get_errno(safe_fcntl(fd, host_cmd, arg));
break;