Closed mattiaverga closed 1 year ago
AFAIK both
fileno
andstrnlen
aren't part of standard library.
According to the pages below, they should be part of the standard library,
but some feature test macros should be defined before including any headers (in common.h
).
https://linux.die.net/man/3/fileno
https://linux.die.net/man/3/strnlen
strdup
needs macros as well:
https://linux.die.net/man/3/strdup
You could try adding these in common.h
, before the #include
s:
#define _XOPEN_SOURCE 700
#define _POSIX_SOURCE 200809L
However, it might be that these macros are not defined by default exactly because your system does not support the features behind them.
Thanks, I've managed to build successfully by commenting out
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -std=c99")
(I suppose the -std=c99
was wrong).
However, my purpose was to package SDLPoP in Fedora repositories, but I later discovered that the data resources location cannot be configured to be out of the binary directory, so... never mind.
I'm trying to build SDLPoP on Fedora, but I get build failures due to some
implicit-function-declaration
errors:AFAIK both
fileno
andstrnlen
aren't part of standard library.