From 8eb204c9df0d3b31fad765aaf7b86437faa03d39 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Tue, 9 Jun 2020 18:26:49 +0000 Subject: [PATCH] Try to build minimp3.obj #2 git-svn-id: svn://kolibrios.org@8030 a494cfbc-eb01-0410-851d-a64ba20cac60 --- contrib/media/minimp3/Tupfile.lua | 2 +- contrib/media/minimp3/minimp3.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/media/minimp3/Tupfile.lua b/contrib/media/minimp3/Tupfile.lua index 848cf029db..47c571913e 100644 --- a/contrib/media/minimp3/Tupfile.lua +++ b/contrib/media/minimp3/Tupfile.lua @@ -4,5 +4,5 @@ then HELPERDIR = "../../../programs" end tup.include(HELPERDIR .. "/use_gcc.lua") -CFLAGS = CFLAGS_OPTIMIZE_SPEED .. " -o minimp3.obj -nostdlib -fwhole-program" +CFLAGS = CFLAGS_OPTIMIZE_SPEED .. " -o minimp3.obj -U_WIN32 -nostdlib -fwhole-program" compile_gcc{"minimp3.c"} diff --git a/contrib/media/minimp3/minimp3.c b/contrib/media/minimp3/minimp3.c index e22489fe51..598d7183fa 100644 --- a/contrib/media/minimp3/minimp3.c +++ b/contrib/media/minimp3/minimp3.c @@ -5,8 +5,8 @@ // memset - may be optimized typedef unsigned int size_t; static inline void* memset(void *mem, int c, unsigned size) { - - for (unsigned int i = 0; i < size; i++ ) + unsigned int i; + for (i = 0; i < size; i++ ) *((char *)mem+i) = (char) c; return mem; @@ -14,8 +14,8 @@ static inline void* memset(void *mem, int c, unsigned size) { // memcpy - may be optimized void* memcpy(void *dest, const void *src, size_t count) { - - for (unsigned int i = 0; i < count; i++) + unsigned int i; + for (i = 0; i < count; i++) *(char *)(dest+i) = *(char *)(src+i); return 0;