package/prboom: fix build w/ gcc-15

This patch force the usage of `-std=gnu18` for GCC15 toolchains to fix
the following issues:

- The boolean issue with C23

```
In file included from ../../src/i_sound.h:38,
                 from i_sound.c:58:
../../src/doomtype.h:48:15: error: cannot use keyword ‘false’ as enumeration constant
   48 | typedef enum {false, true} boolean;
      |               ^~~~~
../../src/doomtype.h:48:15: note: ‘false’ is a keyword with ‘-std=c23’ onwards
```

- The usage of `usleep` & `struct timezone` require usage of GNU
  extensions.

```
i_system.c:58:3: error: implicit declaration of function ‘usleep’; did you mean ‘sleep’? [-Wimplicit-function-declaration]
   58 |   usleep(usecs);
      |   ^~~~~~
      |   sleep
i_system.c: In function ‘I_GetTime_RealTime’:
i_system.c:78:19: error: storage size of ‘tz’ isn’t known
   78 |   struct timezone tz;
      |                   ^~
i_system.c: In function ‘I_GetRandomTimeSeed’:
i_system.c:105:19: error: storage size of ‘tz’ isn’t known
  105 |   struct timezone tz;
      |                   ^~
```

Signed-off-by: Thomas Perale <thomas.perale@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Thomas Perale
2025-08-12 19:18:25 +02:00
committed by Thomas Petazzoni
parent c0bf3da45b
commit 2eb72e7666

View File

@@ -18,6 +18,10 @@ ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
PRBOOM_CFLAGS += -O0
endif
ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_15),y)
PRBOOM_CFLAGS += -std=gnu18
endif
PRBOOM_CONF_ENV += CFLAGS="$(PRBOOM_CFLAGS)"
ifeq ($(BR2_PACKAGE_LIBPNG),y)