From: David Magda Date: Tue, 17 Jun 2003 18:08:19 +0000 (+0000) Subject: use-mkstemp-20030617 X-Git-Tag: openafs-devel-1_3_50~183 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=ae5e2f7865ce1dee9649aa6992f49fc89eb52669;p=packages%2Fo%2Fopenafs.git use-mkstemp-20030617 have the BSDs use mkstemp(3) --- diff --git a/src/butc/tcudbprocs.c b/src/butc/tcudbprocs.c index 10fcb28cd..2ee3f989a 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