Blame SOURCES/bind93-rh490837.patch

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