From: David Magda Date: Thu, 19 Jun 2003 17:18:20 +0000 (+0000) Subject: STABLE12-use-mkstemp-20030617 X-Git-Tag: openafs-stable-1_2_10~39 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=126f1186ea990c278a57fcffb653c4272edb00ce;p=packages%2Fo%2Fopenafs.git STABLE12-use-mkstemp-20030617 have the BSDs use mkstemp(3) (cherry picked from commit ae5e2f7865ce1dee9649aa6992f49fc89eb52669) --- diff --git a/src/butc/tcudbprocs.c b/src/butc/tcudbprocs.c index 506e1b7ce..03c6aa933 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