$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");
