Skip to contentSkip to conversation

configure.ac: fix botched FREAD_READS_DIRECTORIES check

PATCH New Eric Sunshine 1 participant 1 message Apr 9, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure.ac: fix botched FREAD_READS_DIRECTORIES check

3adf9fdecf (configure.ac: loosen FREAD_READS_DIRECTORIES test program, 2017-06-14) broke the test program for the FREAD_READS_DIRECTORIES check by making it syntactically invalid (a dangling ")") and by botching the type returned from 'main' (a FILE* rather than int). As a consequence, the test program won't even compile, thus the check fails unconditionally. Fix these problems.

---

Problem report and discussion:
https://public-inbox.org/git/[email protected]/

 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -1
index 7f8415140f..a30d947e2a 100644
@@ -923,7 +923,7 @@ AC_RUN_IFELSE(
 	[AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
 		[[
 		FILE *f = fopen(".", "r");
-		return f)]])],
+		return f != NULL;]])],
 	[ac_cv_fread_reads_directories=no],
 	[ac_cv_fread_reads_directories=yes])
 ])
Signature · 1 line
2.17.0.484.g0c8726318c