It is not correct when you are saying I would be talking about GNU extensions, the
strdup from the
libreswan build failure is part of POSIX.1-2001.
flex FAQ says:
Why do flex scanners call fileno if it is not ANSI compatible?
Flex scanners call 'fileno()' in order to get the file descriptor
corresponding to 'yyin'. The file descriptor may be passed to
'isatty()' or 'read()', depending upon which '%options' you specified.
If your system does not have 'fileno()' support, to get rid of the
'read()' call, do not specify '%option read'. To get rid of the
'isatty()' call, you must specify one of '%option always-interactive' or
It is rare that people are compiling in strict-ANSI mode. The people who do usually know what they are doing, and when they are using strict-ANSI mode they want such potential portability problems flagged by compile warnings/errors - that's the reason for using strict-ANSI mode.
The best change would be a revert of commit a17d79e.