From 86c061425dd5fc63dd06153159ff289910007962 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 18 Mar 2010 19:56:20 +0000 Subject: [PATCH] - unix compile fix svn path=/trunk/boinc/; revision=20949 --- lib/mfile.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/mfile.cpp b/lib/mfile.cpp index d6fed85187..e459ec21c5 100644 --- a/lib/mfile.cpp +++ b/lib/mfile.cpp @@ -57,8 +57,12 @@ int MFILE::open(const char* path, const char* mode) { // seems like Win's realloc is stupid, Make it smart. // static inline char* realloc_aux(char* p, int len) { +#ifdef _WIN32 if (_msize(p) >= len) return p; return (char*) realloc(p, len*2); +#else + return (char*) realloc(p, len); +#endif } #define BUFSIZE 100000