summaryrefslogtreecommitdiff
path: root/libiberty/mkstemps.c
diff options
context:
space:
mode:
Diffstat (limited to 'libiberty/mkstemps.c')
-rw-r--r--libiberty/mkstemps.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libiberty/mkstemps.c b/libiberty/mkstemps.c
index 093b67af868..a0e68a73b49 100644
--- a/libiberty/mkstemps.c
+++ b/libiberty/mkstemps.c
@@ -127,7 +127,11 @@ mkstemps (char *pattern, int suffix_len)
if (fd >= 0)
/* The file does not exist. */
return fd;
- if (errno != EEXIST)
+ if (errno != EEXIST
+#ifdef EISDIR
+ && errno != EISDIR
+#endif
+ )
/* Fatal error (EPERM, ENOSPC etc). Doesn't make sense to loop. */
break;