lkml.org 
[lkml]   [2020]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] selftests/clone3: Add gun99 to compile in Makefile.
Date
CFLAGS add -std=gnu99.

Fllowing 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
your code

Signed-off-by: Xingxing Su <suxingxing@loongson.cn>
---
tools/testing/selftests/clone3/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/clone3/Makefile b/tools/testing/selftests/clone3/Makefile
index ef7564c..88354a8 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 \
--
1.8.3.1
\
 
 \ /
  Last update: 2020-11-26 08:14    [W:0.052 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site