On Wed, Mar 11, 2020 at 04:57:13PM +0100, Javier Martinez Canillas wrote: > On 3/11/20 4:41 PM, Olaf Hering wrote: > > Am Wed, 11 Mar 2020 12:30:01 +0100 > > schrieb Javier Martinez Canillas <fmart...@redhat.com>: > > > >> +#if !(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) > > > > This does not help. I have seen similar code in one of the zstd headers. > > Yes, I mentioned in the commit message that it was taken from there... > > I would had expected that change to avoid the build failure. I wonder > why it didn't help. > > > Whatever the outcome will be, it should get a 'Fixes commit d5a32255d' tag. > > Agreed. > > Daniel said that instead he will add a -std=gnu99 option so the compiler > uses C99 even if is not its default.
Olaf, could you try the patch in the attachment? Please rerun ./autogen.sh and ./configure after applying it. Daniel
diff --git a/configure.ac b/configure.ac index 88c0adbae..77175c94b 100644 --- a/configure.ac +++ b/configure.ac @@ -36,7 +36,7 @@ AC_INIT([GRUB],[2.05],[bug-g...@gnu.org]) AC_CONFIG_AUX_DIR([build-aux]) # We don't want -g -O2 by default in CFLAGS -: ${CFLAGS=""} +: ${CFLAGS='-std=gnu99'} # Checks for build, host and target systems. AC_CANONICAL_BUILD @@ -80,6 +80,12 @@ if test "x$TARGET_CFLAGS" = x; then TARGET_CFLAGS="$TARGET_CFLAGS -Os" fi +TARGET_CFLAGS="$TARGET_CFLAGS -std=gnu99" + +BUILD_CFLAGS="$BUILD_CFLAGS -std=gnu99" + +HOST_CFLAGS="$HOST_CFLAGS -std=gnu99" + # Default HOST_CPPFLAGS HOST_CPPFLAGS="$HOST_CPPFLAGS -Wall -W" HOST_CPPFLAGS="$HOST_CPPFLAGS -DGRUB_UTIL=1"
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel