summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/ed/files/0.2-mkstemp.patch')
-rw-r--r--sys-apps/ed/files/0.2-mkstemp.patch2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys-apps/ed/files/0.2-mkstemp.patch b/sys-apps/ed/files/0.2-mkstemp.patch
index 4223f85a4fc2..5fe98b81049a 100644
--- a/sys-apps/ed/files/0.2-mkstemp.patch
+++ b/sys-apps/ed/files/0.2-mkstemp.patch
@@ -26,7 +26,7 @@ diff -Naur ed-0.2/buf.c ed-0.2-2/buf.c
strcpy (sfn, "/tmp/ed.XXXXXX");
- if (mktemp (sfn) == NULL || (sfp = fopen (sfn, "w+")) == NULL)
+ sfd = mkstemp(sfn);
-+ if ((sfd == -1) || (sfp = fdopen (sfn, "w+")) == NULL)
++ if ((sfd == -1) || (sfp = fdopen (sfd, "w+")) == NULL)
{
fprintf (stderr, "%s: %s\n", sfn, strerror (errno));
sprintf (errmsg, "Cannot open temp file");