diff options
Diffstat (limited to 'ports/unix/guts/mkstemp.c')
-rw-r--r-- | ports/unix/guts/mkstemp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ports/unix/guts/mkstemp.c b/ports/unix/guts/mkstemp.c index 46c0be1..2ad3f19 100644 --- a/ports/unix/guts/mkstemp.c +++ b/ports/unix/guts/mkstemp.c @@ -1,12 +1,12 @@ /* - * Copyright (c) 2008-2010 Wind River Systems; see + * Copyright (c) 2008-2010, 2012 Wind River Systems; see * guts/COPYRIGHT for information. * * static int * wrap_mkstemp(char *template) { * int rc = -1; */ - struct stat buf; + PSEUDO_STATBUF buf; int save_errno; size_t len; char *tmp_template; @@ -29,13 +29,13 @@ if (rc != -1) { save_errno = errno; - if (real_fstat(rc, &buf) != -1) { - pseudo_client_op_plain(OP_CREAT, 0, -1, -1, tmp_template, &buf); - pseudo_client_op_plain(OP_OPEN, PSA_READ | PSA_WRITE, rc, -1, tmp_template, &buf); + if (base_fstat(rc, &buf) != -1) { + pseudo_client_op(OP_CREAT, 0, -1, -1, tmp_template, &buf); + pseudo_client_op(OP_OPEN, PSA_READ | PSA_WRITE, rc, -1, tmp_template, &buf); } else { pseudo_debug(1, "mkstemp (fd %d) succeeded, but fstat failed (%s).\n", rc, strerror(errno)); - pseudo_client_op_plain(OP_OPEN, PSA_READ | PSA_WRITE, rc, -1, tmp_template, 0); + pseudo_client_op(OP_OPEN, PSA_READ | PSA_WRITE, rc, -1, tmp_template, 0); } errno = save_errno; } |