On Tue, May 07, 2024 at 09:38:26PM +0000, Edward Liaw wrote: > Add the -D_GNU_SOURCE flag to KHDR_INCLUDES so that it is defined in a > central location. > > 809216233555 ("selftests/harness: remove use of LINE_MAX") introduced > asprintf into kselftest_harness.h, which is a GNU extension and needs > _GNU_SOURCE to either be defined prior to including headers or with the > -D_GNU_SOURCE flag passed to the compiler. Reviewed-by: Mark Brown <broonie@xxxxxxxxxx> This does mean we define _GNU_SOURCE for nolibc (and I guess any other libc people use like bionic) but hopefully nobody's using the same define with a different meaning so should be fine.
Attachment:
signature.asc
Description: PGP signature
- References:
- [PATCH v2 0/5] Define _GNU_SOURCE for sources using
- From: Edward Liaw
- [PATCH v2 1/5] selftests: Compile kselftest headers with -D_GNU_SOURCE
- From: Edward Liaw
- [PATCH v2 0/5] Define _GNU_SOURCE for sources using
- Prev by Date: Re: [PATCH v1 1/1] ASoC: atmel: tse850-pcm5142: Remove unused of_gpio.h
- Next by Date: Re: [PATCH] ALSA: hda/cs_dsp_ctl: Use private_free for control cleanup
- Previous by thread: Re: [PATCH v2 1/5] selftests: Compile kselftest headers with -D_GNU_SOURCE
- Next by thread: Re: [PATCH v2 1/5] selftests: Compile kselftest headers with -D_GNU_SOURCE
- Index(es):