summaryrefslogtreecommitdiff
path: root/converters/mpack/patches/patch-ab
blob: 7ad142f7d07fa6102af7faf9897cbfc175726f73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
$NetBSD: patch-ab,v 1.6 2005/12/19 00:13:39 joerg Exp $

--- unixos.c.orig	1995-02-16 21:39:50.000000000 +0000
+++ unixos.c
@@ -23,6 +23,7 @@
  * SOFTWARE.
  */
 #include <stdio.h>
+#include <stdlib.h>
 #include <ctype.h>
 #include <string.h>
 #include <errno.h>
@@ -36,10 +37,6 @@
 #define MAXHOSTNAMELEN 64
 #endif
 
-extern int errno;
-extern char *malloc();
-extern char *getenv();
-
 int overwrite_files = 0;
 int didchat;
 
@@ -89,7 +86,11 @@ char *id;
 	strcpy(buf, getenv("TMPDIR"));
     }
     else {
+#if defined(P_tmpdir)
+	strcpy(buf, P_tmpdir);
+#else
 	strcpy(buf, "/usr/tmp");
+#endif
     }
     strcat(buf, "/m-prts-");
     p = getenv("USER");