Skip to content

Commit

Permalink
Make sure off_t is defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Jul 12, 2019
1 parent 0467a94 commit 8cde8ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/e57/libE57Format/src/CheckedFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* DEALINGS IN THE SOFTWARE.
*/

#if defined(WIN32)
#ifdef _WIN32
#if defined(_MSC_VER)
#include <io.h>
#elif defined(__GNUC__)
Expand Down Expand Up @@ -380,7 +380,7 @@ void CheckedFile::seek(off_t offset, OffsetMode omode)
off_t CheckedFile::portableSeek(off_t offset, int whence)
{
off_t result;
#if defined(WIN32)
#ifdef _WIN32
result = _lseeki64(fd_, offset, whence);
#elif defined(LINUX) || defined(MACOS)
result = ::lseek(fd_, offset, whence);
Expand Down
4 changes: 4 additions & 0 deletions plugins/e57/libE57Format/src/CheckedFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@

#include "Common.h"

#ifdef _WIN32
typedef int64_t off_t;
#endif

namespace e57 {

class CheckedFile
Expand Down

0 comments on commit 8cde8ca

Please sign in to comment.