From 60ecfb1bd03ce3154c0b4295d3de21e1227caef6 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 31 Jul 2008 23:22:09 +0200 Subject: * mkstemps.c (mkstemps): Keep looping even for EISDIR. From-SVN: r138436 --- libiberty/mkstemps.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libiberty/mkstemps.c') diff --git a/libiberty/mkstemps.c b/libiberty/mkstemps.c index 093b67a..a0e68a7 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; -- cgit v1.1