Fix Linux build broken since 2006. Two issues: (1) do _FILE_OFFSET_BITS=64

instead of rolling a private _llseek syscall using now-nonexistent type
declarations; (2) as noted in PR 33893 use errno.h instead of "extern int
errno".
This commit is contained in:
dholland 2010-03-08 01:21:24 +00:00
parent 889d624a64
commit 0ef866ecdb
3 changed files with 45 additions and 3 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.6 2006/03/01 22:48:05 wiz Exp $
$NetBSD: distinfo,v 1.7 2010/03/08 01:21:24 dholland Exp $
SHA1 (tct-1.09.tar.gz) = fffb6ae1f389cfdfad95a9a81f6eaba115c9dfc0
RMD160 (tct-1.09.tar.gz) = ee4ddc286a2564f9b1daaa41f35e3d0fe8d6ea71
@ -9,7 +9,7 @@ SHA1 (patch-ac) = 18cf7490310cbf1831f4fcc77fb9c414191542dc
SHA1 (patch-ad) = 747a0eb789933bd3f7e840a3dc28bd2dd6929819
SHA1 (patch-ae) = 6403b5788edabd7e9146450282aad2460e83bc7e
SHA1 (patch-af) = bbf402d8d4c5c6118e158d70f4e1814f0e179c8d
SHA1 (patch-ag) = f4bcf5d08b2df418b38182aa0ea0e574d377f9f4
SHA1 (patch-ag) = 9767ae8b3ed7f940c8350f944c363ac10694f7f4
SHA1 (patch-ah) = 6a4b473141ffbced2f5491b215b30cbf4fc9bfd1
SHA1 (patch-ai) = 8bc7f949bed634b1c5e0ee78295e80a0b8ce6e0a
SHA1 (patch-aj) = fc67eefa3f92ceb8f4703b6a00ad7fe3777c3357
@ -18,3 +18,4 @@ SHA1 (patch-al) = 4d01407b6566d16d7f5c0fb718644e90aa2b9094
SHA1 (patch-am) = 2a45fcdfb88c0340e46419bcd76eef7c7202a9f9
SHA1 (patch-an) = ee3ed219467a4e3212a8ff7345e4d6a6c2163b17
SHA1 (patch-ao) = 243091eb5dc20955f82b4707947ee7f09a5a3c20
SHA1 (patch-ap) = 1587d7b4e4da1226a2943a4f98b9fa20bd83c79d

View file

@ -1,7 +1,29 @@
$NetBSD: patch-ag,v 1.2 2005/01/22 15:59:58 ben Exp $
$NetBSD: patch-ag,v 1.3 2010/03/08 01:21:25 dholland Exp $
--- src/fstools/fs_tools.h.orig 2001-09-07 10:06:57.000000000 -0700
+++ src/fstools/fs_tools.h
@@ -182,14 +182,20 @@ extern int optind;
* Linux 2.whatever. We'll see how stable the interfaces are.
*/
#if defined(LINUX2)
+#define _FILE_OFFSET_BITS 64
#define SUPPORTED
#include <linux/ext2_fs.h>
#define HAVE_EXT2FS
+#if 0
#define USE_MYLSEEK
#define HAVE_LLSEEK
-#define HAVE_DTIME
#define LSEEK mylseek
#define OFF_T long long
+#else
+#define LSEEK lseek
+#define OFF_T off_t
+#endif
+#define HAVE_DTIME
#define STRTOUL strtoul
#define DADDR_T __u32
#define EXT2FS_TYPE "ext2fs"
@@ -203,6 +203,26 @@ extern int optind;
#endif
#endif

View file

@ -0,0 +1,19 @@
$NetBSD: patch-ap,v 1.1 2010/03/08 01:21:25 dholland Exp $
Don't declare own errno, it doesn't work on various platforms.
--- src/file/file.h~ 2000-07-30 19:39:20.000000000 -0400
+++ src/file/file.h 2010-03-07 20:09:46.000000000 -0500
@@ -101,8 +101,11 @@ extern void ckfprintf __P((FILE *, con
extern unsigned long signextend __P((struct magic *, unsigned long));
-
+#if 0
extern int errno; /* Some unixes don't define this.. */
+#else
+#include <errno.h>
+#endif
extern char *progname; /* the program name */
extern char *magicfile; /* name of the magic file */