$NetBSD: patch-ar,v 1.1 2000/06/16 14:16:55 pooka Exp $
--- lib/libxview/ttysw/termsw.c.orig	Sat Jan  8 05:26:42 2000
+++ lib/libxview/ttysw/termsw.c	Sat Jan  8 05:29:21 2000
@@ -252,8 +252,12 @@
 
     /* Generate a new temporary file name and open the file up. */
     (void) strcpy(tmpfile_name, "/tmp/tty.txt.XXXXXX");
+#if (defined(BSD) && (BSD >= 199103))
+    if ((fd = mkstemp(tmpfile_name)) < 0) {
+#else
     (void) mktemp(tmpfile_name);
     if ((fd = open(tmpfile_name, O_CREAT | O_RDWR | O_EXCL, 0600)) < 0) {
+#endif
 	return (XV_ERROR);
     }
     (void) close(fd);
