linux-user: Add support for SO_REUSEPORT
Add support for SO_REUSEPORT, including strace support. SO_REUSEPORT
was introduced relatively recently, since Linux 3.9, so use
'#if defined SO_REUSEPORT'.
Signed-off-by: Yunqiang Su <ysu@wavecomp.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <1540904108-30873-4-git-send-email-aleksandar.markovic@rt-rk.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 810a58b..5c16692 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -2061,6 +2061,11 @@
case TARGET_SO_REUSEADDR:
optname = SO_REUSEADDR;
break;
+#ifdef SO_REUSEPORT
+ case TARGET_SO_REUSEPORT:
+ optname = SO_REUSEPORT;
+ break;
+#endif
case TARGET_SO_TYPE:
optname = SO_TYPE;
break;
@@ -2222,6 +2227,11 @@
case TARGET_SO_REUSEADDR:
optname = SO_REUSEADDR;
goto int_case;
+#ifdef SO_REUSEPORT
+ case TARGET_SO_REUSEPORT:
+ optname = SO_REUSEPORT;
+ goto int_case;
+#endif
case TARGET_SO_TYPE:
optname = SO_TYPE;
goto int_case;