[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <D18164GGOJ2P.UC10KNQCPM6Y@kernel.org>
Date: Mon, 13 May 2024 01:48:09 +0300
From: "Jarkko Sakkinen" <jarkko@...nel.org>
To: "Mirsad Todorovac" <mtodorovac69@...il.com>,
<linux-kselftest@...r.kernel.org>
Cc: "Dave Hansen" <dave.hansen@...ux.intel.com>, "Shuah Khan"
<shuah@...nel.org>, <linux-sgx@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, "Edward Liaw" <edliaw@...gle.com>
Subject: Re: [PATCH v1 1/1] selftests/sgx: Fix the implicit declaration of
asprintf() compiler error
On Fri May 10, 2024 at 11:37 PM EEST, Mirsad Todorovac wrote:
> tools/testing/selftests/sgx/main.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/testing/selftests/sgx/main.c b/tools/testing/selftests/sgx/main.c
> index 9820b3809c69..f5cb426bd797 100644
> --- a/tools/testing/selftests/sgx/main.c
> +++ b/tools/testing/selftests/sgx/main.c
> @@ -6,6 +6,9 @@
> #include <errno.h>
> #include <fcntl.h>
> #include <stdbool.h>
> +#ifndef __USE_GNU
> +#define __USE_GNU
> +#endif
> #include <stdio.h>
> #include <stdint.h>
> #include <stdlib.h>
__USE_GNU is an internal define, never use it for anything.
Use #define _GNU_SOURCE instead without ifndef/endif [1].
[1] https://man7.org/linux/man-pages/man3/asprintf.3.html
BR, Jarkko
Powered by blists - more mailing lists