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;