Red Hat Bugzilla – Bug 199320
Defining _POSIX_SOURCE breaks some applications
Last modified: 2015-05-04 21:32:32 EDT
Description of problem:
With release 39, #define _POSIX_SOURCE was added to the flex preamble. This causes sys/types.h to
not define certain common types such as u_short, which in turn breaks a number of applications.
It can't be overriden by changes to the lexer file, as sys/types.h is included before any of the header
files from the lexer source are included.
The work around is to explicitly force _BSD_SOURCE when compiling the resulting .c file, but this
requires wide spread changes to application build files.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Take application which requires BSD typedefs such as u_short from within lexer included files
2. Build against recent flex
3. Things break
u_short isn't defined.
u_short (and other BSD source symbols) should be defined in order to match existing behaviour
I'm happy to create an explicit test case for this if you would like - this is a real pain for a number
of applications, including OpenAFS.
*** This bug has been marked as a duplicate of 199316 ***