/*
- * $Id: file.c,v 1.85 2003-02-17 02:12:04 jmarcus Exp $
+ * $Id: file.c,v 1.86 2003-02-19 18:59:52 jmarcus Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
struct ofork *s_of;
struct ofork *d_of;
int crossdev;
- int tmpfd;
#ifdef CNID_DB
int slen, dlen;
* NOTE: the temp file will be in the dest file's directory. it
* will also be inaccessible from AFP. */
memcpy(temp, APPLETEMP, sizeof(APPLETEMP));
- if ((tmpfd = mkstemp(temp)) == -1)
+ if (!mktemp(temp))
return AFPERR_MISC;
- close(tmpfd);
/* now, quickly rename the file. we error if we can't. */
if ((err = renamefile(p, temp, temp, vol_noadouble(vol), adsp)) < 0)