pkgsrc/x11/xview-lib/patches/patch-cq
abs c9c8f97e88 - Add PKG_DESTDIR_SUPPORT
- Depend on the latest version of xview-config
- Mark as LICENSE sun-openlook-license
- Bump pkgrevision
2009-12-10 20:35:56 +00:00

17 lines
608 B
Text

$NetBSD: patch-cq,v 1.2 2009/12/10 20:35:57 abs Exp $
--- lib/libxview/ttysw/termsw.c.orig 1993-06-29 05:17:15.000000000 +0000
+++ lib/libxview/ttysw/termsw.c
@@ -252,8 +252,12 @@ termsw_folio_init_internal(parent, terms
/* 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);