Skip to content

Commit c6780b6

Browse files
committed
Add feature test macro _POSIX_C_SOURCE to enable fileno()
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]>
1 parent da7df8a commit c6780b6

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

opal/util/Makefile.am

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,12 @@ libopalutil_core_la_DEPENDENCIES = \
138138
json/libopalutil_json.la \
139139
keyval/libopalutilkeyval.la
140140

141+
# flex prior to version 2.6.6 uses the POSIX extension fileno()
142+
# without providing the proper feature test macro, so
143+
# we add the _POSIX_C_SOURCE macro here.
144+
# See https://github.com/westes/flex/issues/263
145+
libopalutil_core_la_CFLAGS = -D_POSIX_C_SOURCE=200809L
146+
141147
# Conditionally install the header files
142148

143149
if WANT_INSTALL_HEADERS

opal/util/keyval/Makefile.am

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,11 @@ libopalutilkeyval_la_SOURCES = \
3030
keyval_lex.h \
3131
keyval_lex.l
3232

33+
# flex prior to version 2.6.6 uses the POSIX extension fileno()
34+
# without providing the proper feature test macro, so
35+
# we add the _POSIX_C_SOURCE macro here.
36+
# See https://github.com/westes/flex/issues/263
37+
libopalutilkeyval_la_CFLAGS = -D_POSIX_C_SOURCE=200809L
38+
3339
maintainer-clean-local:
3440
rm -f keyval_lex.c

0 commit comments

Comments
 (0)