Fix compile using `FROM ubuntu:20.04` 18/290818/1 accepted/tizen/unified/20230621.023214 accepted/tizen/unified/dev/20230726.115432
authorndrewh <ndrewh@users.noreply.github.com>
Thu, 4 Nov 2021 01:17:18 +0000 (21:17 -0400)
committerDongkyun Son <dongkyun.s@samsung.com>
Mon, 3 Apr 2023 23:58:20 +0000 (08:58 +0900)
Remove clone_args members that are only present in 5.5+ and 5.7+

cherry-picked upstream commit b248125

Change-Id: I05e6d003bf528ff4c445d1610b440eafc2f81ff7

subproc.cc

index 7792fbd697d55d13d57d493a1df4c8807c03f00e..1be9ead34b41b790ed74ffb8c83e6362e7a26080 100644 (file)
@@ -528,19 +528,9 @@ pid_t cloneProc(uintptr_t flags, int exit_signal) {
        }
 
 #if defined(__NR_clone3)
-       struct clone_args ca = {
-           .flags = (uint64_t)flags,
-           .pidfd = 0,
-           .child_tid = 0,
-           .parent_tid = 0,
-           .exit_signal = (uint64_t)exit_signal,
-           .stack = 0,
-           .stack_size = 0,
-           .tls = 0,
-           .set_tid = 0,
-           .set_tid_size = 0,
-           .cgroup = 0,
-       };
+       struct clone_args ca = {};
+       ca.flags = (uint64_t)flags;
+       ca.exit_signal = (uint64_t)exit_signal;
 
        pid_t ret = util::syscall(__NR_clone3, (uintptr_t)&ca, sizeof(ca));
        if (ret != -1 || errno != ENOSYS) {