mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: Xingxing Su <suxingxing@loongson.cn>,
	Christian Brauner <christian@brauner.io>,
	Shuah Khan <shuah@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH v2] selftests/clone3: Fix build error
Date: Mon, 7 Dec 2020 15:02:05 -0700	[thread overview]
Message-ID: <22c84b2d-2a1c-8947-c217-27888bfbcd51@linuxfoundation.org> (raw)
In-Reply-To: <1606447017-10640-1-git-send-email-suxingxing@loongson.cn>

On 11/26/20 8:16 PM, Xingxing Su wrote:
> 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>
> ---
>   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 \
> 

Applied to linux-kselftest fixes for 5.11-rc1

thanks,
-- Shuah

      reply	other threads:[~2020-12-07 22:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-27  3:16 Xingxing Su
2020-12-07 22:02 ` Shuah Khan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22c84b2d-2a1c-8947-c217-27888bfbcd51@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=christian@brauner.io \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=suxingxing@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®