summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/mktemp.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/mktemp.c')
-rw-r--r--lib/libc/stdio/mktemp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/stdio/mktemp.c b/lib/libc/stdio/mktemp.c
index abf5fa5b28c..1df399aea51 100644
--- a/lib/libc/stdio/mktemp.c
+++ b/lib/libc/stdio/mktemp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mktemp.c,v 1.29 2010/02/11 16:48:36 guenther Exp $ */
+/* $OpenBSD: mktemp.c,v 1.30 2010/03/21 23:09:30 schwarze Exp $ */
/*
* Copyright (c) 1996-1998, 2008 Theo de Raadt
* Copyright (c) 1997, 2008-2009 Todd C. Miller
@@ -82,6 +82,8 @@ mktemp_internal(char *path, int slen, int mode)
break;
}
} while (--tries);
+
+ errno = EEXIST;
return(-1);
}