$NetBSD: patch-am,v 1.1 2012/02/24 18:36:48 christos Exp $ --- lib/mp4v2/mp4file_io.cpp.orig 2007-04-30 16:29:28.000000000 -0400 +++ lib/mp4v2/mp4file_io.cpp 2012-02-24 13:04:54.000000000 -0500 @@ -34,13 +34,11 @@ } return fpos; } else { - fpos_t fpos; - if (fgetpos(pFile, &fpos) < 0) { + u_int64_t fpos = ftello(pFile); + if (fpos == (u_int64_t)-1) { throw new MP4Error(errno, "MP4GetPosition"); } - uint64_t ret; - FPOS_TO_VAR(fpos, uint64_t, ret); - return ret; + return fpos; } } else { return m_memoryBufferPosition; @@ -56,9 +54,7 @@ throw new MP4Error("setting position via Virtual I/O", "MP4SetPosition"); } } else { - fpos_t fpos; - VAR_TO_FPOS(fpos, pos); - if (fsetpos(pFile, &fpos) < 0) { + if (fseeko(pFile, pos, SEEK_SET) < 0) { throw new MP4Error(errno, "MP4SetPosition"); } }