From f1047fc3580cdbfa2d8cb3588a2e2303b9599609 Mon Sep 17 00:00:00 2001 From: spacy51 Date: Wed, 12 Nov 2008 22:48:39 +0000 Subject: [PATCH] PATCH by KunaiTeam: off64_t undefined on OS X and BSD --- src/Patch.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Patch.cpp b/src/Patch.cpp index 8f82532f..86900335 100644 --- a/src/Patch.cpp +++ b/src/Patch.cpp @@ -13,8 +13,14 @@ // #include "Port.h" #ifdef __GNUC__ +#if defined(__APPLE__) || defined (BSD) +typedef off_t __off64_t; /* off_t is 64 bits on BSD. */ +#define fseeko64 fseeko +#define ftello64 ftello +#else typedef off64_t __off64_t; -#endif +#endif /* __APPLE__ || BSD */ +#endif /* __GNUC__ */ #ifndef _MSC_VER #define _stricmp strcasecmp @@ -26,12 +32,6 @@ typedef off64_t __off64_t; typedef __int64 __off64_t; #endif -#if defined(__APPLE__) || defined (MACOSX) -#define fseeko64 fseeko -#define ftello64 ftello -typedef off_t __off64_t; -#endif /* __APPLE__ || MACOSX */ - static int readInt2(FILE *f) { int res = 0;