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 7e14e2b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions opal/util/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ libopalutil_core_la_LIBADD = \
libopalutil_core_la_DEPENDENCIES = \
keyval/libopalutilkeyval.la

# flex prior to version 2.6.6 uses the POSIX extension fileno()
# without providing the proper feature test macro, so
# we add the _POSIX_C_SOURCE macro here.
# See https://github.com/westes/flex/issues/263
libopalutil_core_la_CFLAGS = -D_POSIX_C_SOURCE=200809L

# Conditionally install the header files

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

# flex prior to version 2.6.6 uses the POSIX extension fileno()
# without providing the proper feature test macro, so
# we add the _POSIX_C_SOURCE macro here.
# See https://github.com/westes/flex/issues/263
libopalutilkeyval_la_CFLAGS = -D_POSIX_C_SOURCE=200809L

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

0 comments on commit 7e14e2b

Please sign in to comment.