diff options
author | Xingxing Su <suxingxing@loongson.cn> | 2020-11-27 06:16:57 +0300 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2020-12-08 00:34:55 +0300 |
commit | 88f4ede44c585b24674dd99841040b2a1a856a76 (patch) | |
tree | 73380abbbe272c2cf6178a569e6b58cf89894a3a /tools/testing/selftests/clone3 | |
parent | 6f39cecdb6018234a47dcea15121f01b9903d16b (diff) | |
download | linux-88f4ede44c585b24674dd99841040b2a1a856a76.tar.xz |
selftests/clone3: Fix build error
When compiling the selftests with the -std=gnu99 option the build can
fail with.
Following build error:
test_core.c: In function ‘test_cgcore_destroy’:
test_core.c:87:2: error: ‘for’ loop initial declarations are only
allowed in C99 mode
for (int i = 0; i < 10; i++) {
^
test_core.c:87:2: note: use option -std=c99 or -std=gnu99 to compile
Add -std=gnu99 to the clone3 selftest Makefile to fix this.
Signed-off-by: Xingxing Su <suxingxing@loongson.cn>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/clone3')
-rw-r--r-- | tools/testing/selftests/clone3/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/clone3/Makefile b/tools/testing/selftests/clone3/Makefile index ef7564cb7abe..79b19a2863a0 100644 --- a/tools/testing/selftests/clone3/Makefile +++ b/tools/testing/selftests/clone3/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -CFLAGS += -g -I../../../../usr/include/ +CFLAGS += -g -std=gnu99 -I../../../../usr/include/ LDLIBS += -lcap TEST_GEN_PROGS := clone3 clone3_clear_sighand clone3_set_tid \ |