Skip to content

Commit 571c1e7

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 bfee4f1 commit 571c1e7

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
@@ -131,6 +131,12 @@ libopalutil_core_la_LIBADD = \
131131
libopalutil_core_la_DEPENDENCIES = \
132132
keyval/libopalutilkeyval.la
133133

134+
# flex prior to version 2.6.6 uses the POSIX extension fileno()
135+
# without providing the proper feature test macro, so
136+
# we add the _POSIX_C_SOURCE macro here.
137+
# See https://github.com/westes/flex/issues/263
138+
libopalutil_core_la_CFLAGS = -D_POSIX_C_SOURCE=200809L
139+
134140
# Conditionally install the header files
135141

136142
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)