From 9c6a9025a2b856e4e044ef3e0ad7a9462a79a850 Mon Sep 17 00:00:00 2001 From: bgk Date: Tue, 27 Dec 2011 15:34:39 +0000 Subject: [PATCH] Some fixes to help building on NetBSD --- src/common/Patch.cpp | 2 +- src/common/memgzio.c | 2 +- src/common/memgzio.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/Patch.cpp b/src/common/Patch.cpp index cdc48545..3834669f 100644 --- a/src/common/Patch.cpp +++ b/src/common/Patch.cpp @@ -7,7 +7,7 @@ #ifdef __GNUC__ -#if defined(__APPLE__) || defined (BSD) +#if defined(__APPLE__) || defined (BSD) || defined (__NetBSD__) typedef off_t __off64_t; /* off_t is 64 bits on BSD. */ #define fseeko64 fseeko #define ftello64 ftello diff --git a/src/common/memgzio.c b/src/common/memgzio.c index 558a2d05..e82f0db3 100644 --- a/src/common/memgzio.c +++ b/src/common/memgzio.c @@ -698,7 +698,7 @@ long ZEXPORT memtell(file) return memTell(s->file); } -long ZEXPORT memgzseek(gzFile file, long off, int whence) +z_off_t ZEXPORT memgzseek(gzFile file, z_off_t off, int whence) { if(whence != SEEK_CUR) { fputs("FIXME: memgzio does not support seeking\n", stderr); diff --git a/src/common/memgzio.h b/src/common/memgzio.h index 1e56e44d..90a3963d 100644 --- a/src/common/memgzio.h +++ b/src/common/memgzio.h @@ -19,6 +19,6 @@ int ZEXPORT memgzread(gzFile file, voidp buf, unsigned len); int ZEXPORT memgzwrite(gzFile file, const voidp buf, unsigned len); int ZEXPORT memgzclose(gzFile file); long ZEXPORT memtell(gzFile file); -long ZEXPORT memgzseek(gzFile file, long offset, int whence); +z_off_t ZEXPORT memgzseek(gzFile file, z_off_t off, int whence); #endif // MEMGZIO_H