[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Compiling GNU Sharutils on NetBSD
From: |
HIRAMATSU Yoshifumi |
Subject: |
Compiling GNU Sharutils on NetBSD |
Date: |
Mon, 06 Apr 2015 18:47:33 +0900 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) Emacs/24.4 Mule/6.0 (HANACHIRUSATO) |
Hello,
Compiling Sharutil on recent NetBSD fails. This mail describes shortly.
In GNU Sharutil's lib/fseeko.c, line 134 starts comment about NetBSD.
/* Use a union, since on NetBSD, the compilation flags
determine whether fpos_t is typedef'd to off_t or a struct
containing a single off_t member. */
However, NetBSD changed definition of _offset from fpos_t struct to __off_t,
which is typedef of __int64_t.
So the following code does not match the definition of FILE, results in build
fail.
See ->
http://cvsweb.netbsd.org/bsdweb.cgi/src/include/stdio.h.diff?r1=1.79&r2=1.80&f=h
This patch fixes compilation and "make check" succeed.
--- lib/fseeko.c.orig 2015-04-05 22:42:44.000000000 +0900
+++ lib/fseeko.c 2015-04-05 22:42:52.000000000 +0900
@@ -125,7 +125,7 @@
fp->_flags &= ~_IO_EOF_SEEN;
fp->_offset = pos;
#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD,
DragonFly, Mac OS X, Cygwin */
-# if defined __CYGWIN__
+# if defined __CYGWIN__ || defined __NetBSD__
/* fp_->_offset is typed as an integer. */
fp_->_offset = pos;
# else
Kind regards,
HIRAMATSU, Yoshifumi
- Compiling GNU Sharutils on NetBSD,
HIRAMATSU Yoshifumi <=