Skip to content

Commit df7fd96

Browse files
committed
Merge branch 'nd/fopen-errors'
Hotfix for a topic that is already in 'master'. * nd/fopen-errors: configure.ac: loosen FREAD_READS_DIRECTORIES test program
2 parents 05ec6e1 + 3adf9fd commit df7fd96

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ all::
1919
# have been written to the final string if enough space had been available.
2020
#
2121
# Define FREAD_READS_DIRECTORIES if you are on a system which succeeds
22-
# when attempting to read from an fopen'ed directory.
22+
# when attempting to read from an fopen'ed directory (or even to fopen
23+
# it at all).
2324
#
2425
# Define NO_OPENSSL environment variable if you do not have OpenSSL.
2526
# This also implies BLK_SHA1.

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,9 +922,9 @@ AC_CACHE_CHECK([whether system succeeds to read fopen'ed directory],
922922
[
923923
AC_RUN_IFELSE(
924924
[AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
925-
[[char c;
925+
[[
926926
FILE *f = fopen(".", "r");
927-
return f && fread(&c, 1, 1, f)]])],
927+
return f)]])],
928928
[ac_cv_fread_reads_directories=no],
929929
[ac_cv_fread_reads_directories=yes])
930930
])

0 commit comments

Comments
 (0)