Message ID | 20240516163245.641115-1-fontaine.fabrice@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | [1/1] package/frotz: fix build with gcc 14 | expand |
Am Thu, 16 May 2024 18:32:45 +0200 schrieb Fabrice Fontaine <fontaine.fabrice@gmail.com>: > Drop -std=c99 from CFLAGS to avoid the following build failure with gcc > 14: > > fastmem.c: In function 'z_restore': > fastmem.c:842:36: error: implicit declaration of function 'strdup'; did you mean 'strcmp'? [-Wimplicit-function-declaration] > 842 | f_setup.aux_name = strdup(default_name); > | ^~~~~~ > | strcmp I'm pretty sure there was originally was a reason for using -std=c99 here ... could we maybe use -std=gnu99 instead of removing it? Thomas
Le jeu. 16 mai 2024 à 21:26, Thomas Huth <huth@tuxfamily.org> a écrit : > > Am Thu, 16 May 2024 18:32:45 +0200 > schrieb Fabrice Fontaine <fontaine.fabrice@gmail.com>: > > > Drop -std=c99 from CFLAGS to avoid the following build failure with gcc > > 14: > > > > fastmem.c: In function 'z_restore': > > fastmem.c:842:36: error: implicit declaration of function 'strdup'; did you mean 'strcmp'? [-Wimplicit-function-declaration] > > 842 | f_setup.aux_name = strdup(default_name); > > | ^~~~~~ > > | strcmp > > I'm pretty sure there was originally was a reason for using -std=c99 here > ... could we maybe use -std=gnu99 instead of removing it? Sure, I'll let you test it and send a v2 ;-) > > Thomas Best Regards, Fabrice
diff --git a/package/frotz/frotz.mk b/package/frotz/frotz.mk index 5af235137c..807c800be9 100644 --- a/package/frotz/frotz.mk +++ b/package/frotz/frotz.mk @@ -20,8 +20,7 @@ endif define FROTZ_BUILD_CMDS $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) PREFIX=/usr CONFIG_DIR=/etc \ - SOUND_TYPE=none CURSES="$(FROTZ_CURSES)" USE_UTF8=$(FROTZ_UTF8) \ - CFLAGS="$(TARGET_CFLAGS) -std=c99" + SOUND_TYPE=none CURSES="$(FROTZ_CURSES)" USE_UTF8=$(FROTZ_UTF8) endef define FROTZ_INSTALL_TARGET_CMDS
Drop -std=c99 from CFLAGS to avoid the following build failure with gcc 14: fastmem.c: In function 'z_restore': fastmem.c:842:36: error: implicit declaration of function 'strdup'; did you mean 'strcmp'? [-Wimplicit-function-declaration] 842 | f_setup.aux_name = strdup(default_name); | ^~~~~~ | strcmp Fixes: - http://autobuild.buildroot.org/results/df3b3b98265ec3a75578614746b2d1426c90e125 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> --- package/frotz/frotz.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)