From 89a75e28fc409eec8f95589b027551c84901d7d7 Mon Sep 17 00:00:00 2001 From: rainwarrior Date: Wed, 24 Aug 2016 23:23:41 +0000 Subject: [PATCH] alternative way of fixing fstat header conflict from r3276 (in case older/other compilers were relying on it), this is only used by netplay.cpp --- trunk/src/netplay.cpp | 2 +- trunk/src/types.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/trunk/src/netplay.cpp b/trunk/src/netplay.cpp index ce6d9a3a..4d2003ad 100644 --- a/trunk/src/netplay.cpp +++ b/trunk/src/netplay.cpp @@ -119,7 +119,7 @@ int FCEUNET_SendFile(uint8 cmd, char *fn) if(!(fp=FCEUD_UTF8fopen(fn,"rb"))) return(0); - fstat(fileno(fp),&sb); + FCEUX_fstat(fileno(fp),&sb); len = sb.st_size; buf = (char*)FCEU_dmalloc(len); //mbg merge 7/17/06 added cast fread(buf, 1, len, fp); diff --git a/trunk/src/types.h b/trunk/src/types.h index 541531f9..bc639dd2 100644 --- a/trunk/src/types.h +++ b/trunk/src/types.h @@ -47,6 +47,7 @@ typedef signed int int32; #define mkdir _mkdir #define alloca _alloca #define snprintf _snprintf +#define FCEUX_fstat _fstat #if _MSC_VER < 1500 #define vsnprintf _vsnprintf #endif @@ -73,6 +74,8 @@ typedef int32_t int32; typedef uint8_t uint8; typedef uint16_t uint16; typedef uint32_t uint32; + +#define FCEUX_fstat fstat #endif #ifdef __GNUC__