about summary refs log tree commit diff
path: root/sysdeps/posix/tempname.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/posix/tempname.c')
-rw-r--r--sysdeps/posix/tempname.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/posix/tempname.c b/sysdeps/posix/tempname.c
index d49971db26..97a01d2b7e 100644
--- a/sysdeps/posix/tempname.c
+++ b/sysdeps/posix/tempname.c
@@ -33,7 +33,7 @@ static int
 direxists (const char *dir)
 {
   struct stat buf;
-  return __stat (dir, &buf) == 0 && S_ISDIR (buf.st_mode);
+  return __xstat (_STAT_VER, dir, &buf) == 0 && S_ISDIR (buf.st_mode);
 }
 
 /* Path search algorithm, for tmpnam, tmpfile, etc.  If DIR is
@@ -161,7 +161,7 @@ __gen_tempname (char *tmpl, int openit, int largefile)
       else
 	{
 	  struct stat st;
-	  if (__stat (tmpl, &st) < 0)
+	  if (__xstat (_STAT_VER, tmpl, &st) < 0)
 	    {
 	      if (errno == ENOENT)
 		{