]> Savannah Git Hosting - gnulib.git/commitdiff
fseeko: fix build failure on NetBSD >= 6
authorHIRAMATSU Yoshifumi <hiramatu@boreas.dti.ne.jp>
Tue, 14 Apr 2015 10:16:47 +0000 (11:16 +0100)
committerPádraig Brady <P@draigBrady.com>
Tue, 14 Apr 2015 10:20:04 +0000 (11:20 +0100)
* lib/fseeko.c (feeko): NetBSD 6 changed the definition of _offset
from 'fpos_t struct' to __off_t, which is a typedef of __int64_t.

ChangeLog
lib/fseeko.c

index 0bf9716ef38f81a6aaa5f20be52d539af43fcbdd..df79036be7cb1f36ffa7e4c7481a72efa07fb403 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-04-14  HIRAMATSU Yoshifumi  <hiramatu@boreas.dti.ne.jp>
+
+       fseeko: fix build failure on NetBSD >= 6 (trivial)
+       * lib/fseeko.c (feeko): NetBSD 6 changed the definition of _offset
+       from 'fpos_t struct' to __off_t, which is a typedef of __int64_t.
+
 2015-04-09  Paul Eggert  <eggert@cs.ucla.edu>
 
        gitlog-to-changelog: port to MS-Windows
index db67e0277a172b7267d1ba47d6a9204b394b3b95..045eb5c5f34397fa2075d36dfbc29035040b80a0 100644 (file)
@@ -128,7 +128,7 @@ fseeko (FILE *fp, off_t offset, int whence)
       fp->_offset = pos;
 #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
       /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
-# if defined __CYGWIN__
+# if defined __CYGWIN__ || (defined __NetBSD__ && __NetBSD_Version__ >= 600000000)
       /* fp_->_offset is typed as an integer.  */
       fp_->_offset = pos;
 # else