00db10
commit cfa8054fbb6212e64d54a3d4926972a6a20e3498
00db10
Author: Andreas Schwab <schwab@suse.de>
00db10
Date:   Tue Jan 15 14:36:09 2013 +0100
00db10
00db10
    Hide reference to mktemp in libpthread
00db10
00db10
diff --git a/include/stdlib.h b/include/stdlib.h
00db10
index 152c12fe9cb41509..edec46fa1ff4cc28 100644
00db10
--- a/include/stdlib.h
00db10
+++ b/include/stdlib.h
00db10
@@ -78,6 +78,7 @@ extern struct drand48_data __libc_drand48_data attribute_hidden;
00db10
 extern int __setenv (const char *__name, const char *__value, int __replace);
00db10
 extern int __unsetenv (const char *__name);
00db10
 extern int __clearenv (void);
00db10
+extern char *__mktemp (char *__template) __THROW __nonnull ((1));
00db10
 extern char *__canonicalize_file_name (const char *__name);
00db10
 extern char *__realpath (const char *__name, char *__resolved);
00db10
 extern int __ptsname_r (int __fd, char *__buf, size_t __buflen);
00db10
diff --git a/misc/Versions b/misc/Versions
00db10
index 64632f0bfa81b00a..ec5aea7b523e7041 100644
00db10
--- a/misc/Versions
00db10
+++ b/misc/Versions
00db10
@@ -151,6 +151,7 @@ libc {
00db10
   }
00db10
   GLIBC_PRIVATE {
00db10
     __madvise;
00db10
+    __mktemp;
00db10
     __libc_ifunc_impl_list;
00db10
   }
00db10
 }
00db10
diff --git a/misc/mktemp.c b/misc/mktemp.c
00db10
index 05a07cb301f9506e..19824f01a11f9af9 100644
00db10
--- a/misc/mktemp.c
00db10
+++ b/misc/mktemp.c
00db10
@@ -22,7 +22,7 @@
00db10
    The last six characters of TEMPLATE must be "XXXXXX";
00db10
    they are replaced with a string that makes the filename unique.  */
00db10
 char *
00db10
-mktemp (template)
00db10
+__mktemp (template)
00db10
      char *template;
00db10
 {
00db10
   if (__gen_tempname (template, 0, 0, __GT_NOCREATE) < 0)
00db10
@@ -31,5 +31,6 @@ mktemp (template)
00db10
 
00db10
   return template;
00db10
 }
00db10
+weak_alias (__mktemp, mktemp)
00db10
 
00db10
 link_warning (mktemp, "the use of `mktemp' is dangerous, better use `mkstemp'")
00db10
diff --git a/nptl/sem_open.c b/nptl/sem_open.c
00db10
index d87076e04a55cf71..a0c488b62ffebcc4 100644
00db10
--- a/nptl/sem_open.c
00db10
+++ b/nptl/sem_open.c
00db10
@@ -334,7 +334,7 @@ sem_open (const char *name, int oflag, ...)
00db10
 	     since the file must be opened with a specific mode.  The
00db10
 	     mode cannot later be set since then we cannot apply the
00db10
 	     file create mask.  */
00db10
-	  if (mktemp (tmpfname) == NULL)
00db10
+	  if (__mktemp (tmpfname) == NULL)
00db10
 	    return SEM_FAILED;
00db10
 
00db10
 	  /* Open the file.  Make sure we do not overwrite anything.  */