Skip to content

community/libretro-craft: fix build with gcc 14

mio requested to merge mio/aports:libretro-craft into master

Add -D_DEFAULT_SOURCE to CFLAGS to enable gethostbyname().

Rebuild error:

src/client.c: In function 'client_connect':
src/client.c:240:17: error: implicit declaration of function 'gethostbyname'; did you mean 'gethostname'? [-Wimplicit-function-declaration]
  240 |     if ((host = gethostbyname(hostname)) == 0)
      |                 ^~~~~~~~~~~~~
      |                 gethostname
src/client.c:240:15: error: assignment to 'struct hostent *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  240 |     if ((host = gethostbyname(hostname)) == 0)
      |               ^
Edited by mio

Merge request reports

Loading