Skip to content

Commit

Permalink
Add feature test macro _POSIX_C_SOURCE to enable fileno()
Browse files Browse the repository at this point in the history
Flex prior to 2.6.6 uses fileno() but does not define the needed
feature test macros.
See westes/flex#263 for details.

Signed-off-by: Joseph Schuchart <[email protected]>
  • Loading branch information
devreal committed Jul 10, 2024
1 parent f64f37b commit d150386
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions opal/util/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ libopalutil_core_la_LIBADD = \
libopalutil_core_la_DEPENDENCIES = \
keyval/libopalutilkeyval.la

# needed for fileno() (flex < 2.6.6)
libopalutil_core_la_CFLAGS = -D_POSIX_C_SOURCE=200809L

# Conditionally install the header files

if WANT_INSTALL_HEADERS
Expand Down
3 changes: 3 additions & 0 deletions opal/util/keyval/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@ libopalutilkeyval_la_SOURCES = \
keyval_lex.h \
keyval_lex.l

# needed for fileno() (flex < 2.6.6)
libopalutilkeyval_la_CFLAGS = -D_POSIX_C_SOURCE=200809L

maintainer-clean-local:
rm -f keyval_lex.c

0 comments on commit d150386

Please sign in to comment.