Skip to content

Commit d150386

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 f64f37b commit d150386

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

opal/util/Makefile.am

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ libopalutil_core_la_LIBADD = \
131131
libopalutil_core_la_DEPENDENCIES = \
132132
keyval/libopalutilkeyval.la
133133

134+
# needed for fileno() (flex < 2.6.6)
135+
libopalutil_core_la_CFLAGS = -D_POSIX_C_SOURCE=200809L
136+
134137
# Conditionally install the header files
135138

136139
if WANT_INSTALL_HEADERS

opal/util/keyval/Makefile.am

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

33+
# needed for fileno() (flex < 2.6.6)
34+
libopalutilkeyval_la_CFLAGS = -D_POSIX_C_SOURCE=200809L
35+
3336
maintainer-clean-local:
3437
rm -f keyval_lex.c

0 commit comments

Comments
 (0)