From 3122ce332378cf62ee692771366fc5489277a882 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 26 Jul 2012 14:16:13 +0200 Subject: [PATCH] (Xbox 1/360) C89 compatibility fixes --- libretro/libretro.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libretro/libretro.c b/libretro/libretro.c index 58bd88d..f4a928a 100644 --- a/libretro/libretro.c +++ b/libretro/libretro.c @@ -143,6 +143,7 @@ int load_archive(char *filename, unsigned char *buffer, int maxsize, char *exten fread(in, CHUNKSIZE, 1, fd); { + int left; /* Get file size */ fseek(fd, 0, SEEK_END); size = ftell(fd); @@ -167,7 +168,7 @@ int load_archive(char *filename, unsigned char *buffer, int maxsize, char *exten } /* Read into buffer */ - int left = size; + left = size; while (left > CHUNKSIZE) { fread(buffer, CHUNKSIZE, 1, fd); @@ -327,6 +328,7 @@ static int slot_load(int slot) /* Device Type */ { + FILE *fp; /* FAT file */ if (slot > 0) { @@ -338,7 +340,7 @@ static int slot_load(int slot) } /* Open file */ - FILE *fp = fopen(filename, "rb"); + fp = fopen(filename, "rb"); if (!fp) { fprintf(stderr, "ERROR - Unable to open file.\n");