From 9d906dc85c7127b5aa6479e1579083d045fa6742 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sun, 24 Nov 2019 17:48:58 +0100
Subject: gcc2 fix


diff --git a/jpegoptim.c b/jpegoptim.c
index 74017e5..9cc8c7a 100644
--- a/jpegoptim.c
+++ b/jpegoptim.c
@@ -828,10 +828,11 @@ int main(int argc, char **argv)
 	    outfname=newname;
 	  } else {
 #ifdef HAVE_MKSTEMPS
+		int tmpfd;
 	    /* rely on mkstemps() to create us temporary file safely... */  
 	    snprintf(tmpfilename,sizeof(tmpfilename),
 		     "%sjpegoptim-%d-%d.XXXXXX.tmp", tmpdir, (int)getuid(), (int)getpid());
-	    int tmpfd = mkstemps(tmpfilename,4);
+	    tmpfd = mkstemps(tmpfilename,4);
 	    if (tmpfd < 0) 
 	      fatal("%s, error creating temp file %s: mkstemps() failed",(stdin_mode?"stdin":argv[i]),tmpfilename);
 	    if ((outfile=fdopen(tmpfd,"wb"))==NULL) 
-- 
2.23.0

