This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
handle existing mkstemp() in mingw-w64-v4
[perl5.git] / win32 / win32.c
index a78c598..879b613 100644 (file)
@@ -1124,6 +1124,7 @@ chown(const char *path, uid_t owner, gid_t group)
  * XXX this needs strengthening  (for PerlIO)
  *   -- BKS, 11-11-200
 */
  * XXX this needs strengthening  (for PerlIO)
  *   -- BKS, 11-11-200
 */
+#if !defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 4
 int mkstemp(const char *path)
 {
     dTHX;
 int mkstemp(const char *path)
 {
     dTHX;
@@ -1144,6 +1145,7 @@ retry:
        goto retry;
     return fd;
 }
        goto retry;
     return fd;
 }
+#endif
 
 static long
 find_pid(pTHX_ int pid)
 
 static long
 find_pid(pTHX_ int pid)