Blame SOURCES/bind93-rh490837.patch

854838
diff --git a/lib/isc/lex.c b/lib/isc/lex.c
854838
index cd44fe3..5b7c539 100644
854838
--- a/lib/isc/lex.c
854838
+++ b/lib/isc/lex.c
854838
@@ -27,6 +27,8 @@
854838
 #include <isc/string.h>
854838
 #include <isc/util.h>
854838
 
854838
+#include "../errno2result.h"
854838
+
854838
 typedef struct inputsource {
854838
 	isc_result_t result;
854838
 	bool is_file;
854838
@@ -422,7 +424,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
854838
 #endif /* if defined(HAVE_FLOCKFILE) && defined(HAVE_GETC_UNLOCKED) */
854838
 				if (c == EOF) {
854838
 					if (ferror(stream)) {
854838
-						source->result = ISC_R_IOERROR;
854838
+						source->result = isc__errno2result(errno);
854838
 						result = source->result;
854838
 						goto done;
854838
 					}
854838
diff --git a/lib/isc/unix/errno2result.c b/lib/isc/unix/errno2result.c
854838
index e3e2644..5e58600 100644
854838
--- a/lib/isc/unix/errno2result.c
854838
+++ b/lib/isc/unix/errno2result.c
854838
@@ -37,6 +37,7 @@ isc___errno2result(int posixerrno, bool dolog, const char *file,
854838
 	case EINVAL: /* XXX sometimes this is not for files */
854838
 	case ENAMETOOLONG:
854838
 	case EBADF:
854838
+	case EISDIR:
854838
 		return (ISC_R_INVALIDFILE);
854838
 	case ENOENT:
854838
 		return (ISC_R_FILENOTFOUND);