From 5d412393341e020f2114be014a61e3fe3ce5a659 Mon Sep 17 00:00:00 2001 From: Daniel Macks Date: Sun, 4 Feb 2018 23:50:06 -0500 Subject: [PATCH] readline.h requires stdio.h to be compileable readline.h uses the `FILE` datatype from stdio.h, without an #include for that system header. Upstream documents that it is the responsibility of any code using readline.h to include that other header itself, and relies on the fact that it is documented to declare that this is not a bug. Some distros patch their readline.h with this dependent #include, but for maximum portability the READLINE compile-test function should do it. --- cmake/FindReadline.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/FindReadline.cmake b/cmake/FindReadline.cmake index 276ab759940..61885fae65b 100644 --- a/cmake/FindReadline.cmake +++ b/cmake/FindReadline.cmake @@ -24,6 +24,7 @@ else( READLINE_INCLUDE_DIR AND READLINE_LIBRARY ) set( CMAKE_REQUIRED_INCLUDES ${READLINE_INCLUDE_DIR} ) check_cxx_source_compiles( " + #include #include int main() {