diff mbox series

[v2] package/frotz: fix build with gcc 14

Message ID 20240517082007.312904-1-huth@tuxfamily.org
State Accepted
Headers show
Series [v2] package/frotz: fix build with gcc 14 | expand

Commit Message

Thomas Huth May 17, 2024, 8:20 a.m. UTC
Change -std=c99 into -std=gnu99 in the 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

Reported-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Huth <huth@tuxfamily.org>
---
 v2: Use gnu99 instead of removing c99

 package/frotz/frotz.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Petazzoni July 12, 2024, 3:16 p.m. UTC | #1
On Fri, 17 May 2024 10:20:07 +0200
Thomas Huth <huth@tuxfamily.org> wrote:

> Change -std=c99 into -std=gnu99 in the 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
> 
> Reported-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> Signed-off-by: Thomas Huth <huth@tuxfamily.org>
> ---
>  v2: Use gnu99 instead of removing c99

Applied to master, thanks.

Thomas
Peter Korsgaard Aug. 6, 2024, 10:15 p.m. UTC | #2
>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > On Fri, 17 May 2024 10:20:07 +0200
 > Thomas Huth <huth@tuxfamily.org> wrote:

 >> Change -std=c99 into -std=gnu99 in the 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
 >> 
 >> Reported-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
 >> Signed-off-by: Thomas Huth <huth@tuxfamily.org>
 >> ---
 >> v2: Use gnu99 instead of removing c99

 > Applied to master, thanks.

Committed to 2024.05.x, thanks.
diff mbox series

Patch

diff --git a/package/frotz/frotz.mk b/package/frotz/frotz.mk
index 5af235137c..4c477c396d 100644
--- a/package/frotz/frotz.mk
+++ b/package/frotz/frotz.mk
@@ -21,7 +21,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"
+		CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
 endef
 
 define FROTZ_INSTALL_TARGET_CMDS