summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2008-07-31 22:01:30 +0000
committerDJ Delorie <dj@redhat.com>2008-07-31 22:01:30 +0000
commit8975bb307270b579dfaeadc21389792021d7304c (patch)
treeecc11efbf3288087aa459cd9ebf5d970f2c27d77 /libiberty
parentf562800dc425ea951fcde303518467c5424e3b18 (diff)
downloadbinutils-gdb-8975bb307270b579dfaeadc21389792021d7304c.tar.gz
merge from gcc
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog4
-rw-r--r--libiberty/mkstemps.c6
2 files changed, 9 insertions, 1 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index da52583c8f2..fa8abf51415 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,7 @@
+2008-07-31 Jakub Jelinek <jakub@redhat.com>
+
+ * mkstemps.c (mkstemps): Keep looping even for EISDIR.
+
2008-07-31 Denys Vlasenko <dvlasenk@redhat.com>
* mkstemps.c (mkstemps): If open failed with errno other than
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;