openbsd-ports/converters/mpack/patches/patch-unixpk_c

26 lines
641 B
Plaintext

$OpenBSD: patch-unixpk_c,v 1.5 2012/10/21 12:59:43 jasper Exp $
--- unixpk.c.orig Mon Jul 21 22:50:41 2003
+++ unixpk.c Sun Oct 21 14:57:31 2012
@@ -25,6 +25,8 @@
#include <stdio.h>
#include <string.h>
#include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
#include "common.h"
#include "version.h"
#include "xmalloc.h"
@@ -164,10 +166,10 @@ int main(int argc, char **argv)
strcpy(fnamebuf, getenv("TMPDIR"));
}
else {
- strcpy(fnamebuf, "/usr/tmp");
+ strcpy(fnamebuf, "/var/tmp");
}
strcat(fnamebuf, "/mpackXXXXXX");
- mktemp(fnamebuf);
+ close(mkstemp(fnamebuf));
outfname = strsave(fnamebuf);
}