From ae5e2f7865ce1dee9649aa6992f49fc89eb52669 Mon Sep 17 00:00:00 2001 From: David Magda Date: Tue, 17 Jun 2003 18:08:19 +0000 Subject: [PATCH] use-mkstemp-20030617 have the BSDs use mkstemp(3) --- src/butc/tcudbprocs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/butc/tcudbprocs.c b/src/butc/tcudbprocs.c index 10fcb28cde..2ee3f989a4 100644 --- a/src/butc/tcudbprocs.c +++ b/src/butc/tcudbprocs.c @@ -1390,8 +1390,10 @@ restoreText(tapeInfo, rstTapeInfoPtr, nextHeader) /* open the text file */ sprintf(filename, "%s/bu_XXXXXX", gettmpdir()); -#ifdef AFS_LINUX20_ENV +#if defined (AFS_LINUX20_ENV) fid = open(mkstemp(filename), O_RDWR|O_CREAT|O_EXCL, 0600); +#elif defined (AFS_XBSD_ENV) + fid = mkstemp(filename); #else fid = open(mktemp(filename), O_RDWR|O_CREAT|O_EXCL, 0600); #endif