From 41f4b31830eee968f84f35d8a847d8815a1126b8 Mon Sep 17 00:00:00 2001 From: Gianluca Recchia Date: Mon, 4 Nov 2019 20:04:12 +0100 Subject: [PATCH] Add support for C11 and C++17 in gcc and g++ --- lxc/executors/c | 2 +- lxc/executors/cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lxc/executors/c b/lxc/executors/c index 0cd5424..d3e3662 100755 --- a/lxc/executors/c +++ b/lxc/executors/c @@ -1,3 +1,3 @@ cd /tmp/$2 -timeout -s KILL 10 gcc -o binary -x c code.code +timeout -s KILL 10 gcc -std=c11 -o binary -x c code.code runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 ./binary" diff --git a/lxc/executors/cpp b/lxc/executors/cpp index 64a5157..d4d351c 100755 --- a/lxc/executors/cpp +++ b/lxc/executors/cpp @@ -1,3 +1,3 @@ cd /tmp/$2 -timeout -s KILL 10 g++ -o binary -x c++ code.code +timeout -s KILL 10 g++ -std=c++17 -o binary -x c++ code.code runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 ./binary"