lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <22c84b2d-2a1c-8947-c217-27888bfbcd51@linuxfoundation.org>
Date:   Mon, 7 Dec 2020 15:02:05 -0700
From:   Shuah Khan <skhan@...uxfoundation.org>
To:     Xingxing Su <suxingxing@...ngson.cn>,
        Christian Brauner <christian@...uner.io>,
        Shuah Khan <shuah@...nel.org>
Cc:     linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
        Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH v2] selftests/clone3: Fix build error

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@...ngson.cn>
> Acked-by: Christian Brauner <christian.brauner@...ntu.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ