Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release-src > by-pkgid > 68c047d3179d4c6548becb04f8f6a92b > files > 2

mingw-giflib-5.0.4-5.mga5.src.rpm

diff -rupN giflib-5.0.4/util/gifinto.c giflib-5.0.4-new/util/gifinto.c
--- giflib-5.0.4/util/gifinto.c	2012-10-17 02:10:20.000000000 +0200
+++ giflib-5.0.4-new/util/gifinto.c	2013-08-09 00:33:11.864642920 +0200
@@ -105,7 +105,15 @@ int main(int argc, char **argv)
     if ( (strlen(FoutTmpName) + strlen(DEFAULT_TMP_NAME))  > STRLEN-1 ) GIF_EXIT("Filename too long.");
     strcat(FoutTmpName, DEFAULT_TMP_NAME);
     int FD;
+#ifdef _WIN32
+    char *tmpFN = _mktemp(FoutTmpName);
+    if (tmpFN)
+	FD = open(tmpFN, O_CREAT | O_EXCL | O_WRONLY);
+    else
+	FD = -1;
+#else
     FD = mkstemp(FoutTmpName); /* returns filedescriptor */
+#endif
     if (FD == -1 )
     {
 	GIF_EXIT("Failed to open output.");