From 7cc9ab5aaaaefc4971c7dcc639f3a4123d20ac46 Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Sun, 5 Aug 2007 19:46:43 +0000 Subject: [PATCH] Stefan Fiedler: silo: remove obsolete linux-2.6.9.patch fix build [2007072400174315861] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@8657 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- .../sparc/silo/ext2fs_h-partial-update.patch | 22 +++++ package/sparc/silo/linux-2.6.9.patch | 85 ------------------- package/sparc/silo/ufs.patch | 74 ++++++++++++++++ 3 files changed, 96 insertions(+), 85 deletions(-) create mode 100644 package/sparc/silo/ext2fs_h-partial-update.patch delete mode 100644 package/sparc/silo/linux-2.6.9.patch create mode 100644 package/sparc/silo/ufs.patch diff --git a/package/sparc/silo/ext2fs_h-partial-update.patch b/package/sparc/silo/ext2fs_h-partial-update.patch new file mode 100644 index 000000000..b370a8238 --- /dev/null +++ b/package/sparc/silo/ext2fs_h-partial-update.patch @@ -0,0 +1,22 @@ +--- ./include/ext2fs/ext2fs.h.orig 2006-06-01 19:24:53.000000000 +0200 ++++ ./include/ext2fs/ext2fs.h 2007-07-23 01:23:19.000000000 +0200 +@@ -50,17 +50,8 @@ + #if EXT2_FLAT_INCLUDES + #include "e2_types.h" + #else +-#include +-#if !defined(__GNUC__) || defined(__STRICT_ANSI__) /* asm/types.h already defines __s64 and __u64 otherwise */ +-#if SIZEOF_LONG == 8 +-typedef __signed__ long __s64; +-typedef unsigned long __u64; +-#elif SIZEOF_LONG_LONG == 8 || \ +- defined(__GNUC__) && (((~0UL) == 0xffffffff) || defined(__i386__)) +-typedef __signed__ long long __s64; +-typedef unsigned long long __u64; +-#endif /* SIZEOF_LONG == 8 */ +-#endif ++#include ++#include + #endif /* EXT2_FLAT_INCLUDES */ + + typedef __u32 blk_t; diff --git a/package/sparc/silo/linux-2.6.9.patch b/package/sparc/silo/linux-2.6.9.patch deleted file mode 100644 index 4605ac386..000000000 --- a/package/sparc/silo/linux-2.6.9.patch +++ /dev/null @@ -1,85 +0,0 @@ -# --- ROCK-COPYRIGHT-NOTE-BEGIN --- -# -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# Please add additional copyright information _after_ the line containing -# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by -# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! -# -# ROCK Linux: rock-src/package/sparc/silo/linux-2.6.9.patch -# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# -# --- ROCK-COPYRIGHT-NOTE-END --- - ---- ./silo/silo.c.orig 2004-11-24 20:02:18.884240368 +0100 -+++ ./silo/silo.c 2004-11-24 20:02:44.857291864 +0100 -@@ -49,6 +49,11 @@ - # define _LINUX_STRING_H_ - #endif - #ifdef __linux__ -+/* for linux-2.6.9, from linux/types.h */ -+# include -+# ifndef pgoff_t -+# define pgoff_t unsigned long -+# endif - # include - # include - # include ---- ./silo/silocheck.c.orig 2004-11-24 20:03:04.171355680 +0100 -+++ ./silo/silocheck.c 2004-11-24 20:03:21.014795088 +0100 -@@ -35,6 +35,11 @@ - # define _LINUX_STRING_H_ - #endif - #ifdef __linux__ -+/* for linux-2.6.9, from linux/types.h */ -+# include -+# ifndef pgoff_t -+# define pgoff_t unsigned long -+# endif - # include - # include - # include ---- ./second/fs/romfs.c.orig 2004-11-24 19:59:31.633666320 +0100 -+++ ./second/fs/romfs.c 2004-11-24 19:59:42.377033080 +0100 -@@ -25,6 +25,20 @@ - #include - #include - #include -+ -+#ifdef __CHECKER__ -+#define __bitwise __attribute__((bitwise)) -+#else -+#define __bitwise -+#endif -+ -+typedef __u16 __bitwise __le16; -+typedef __u16 __bitwise __be16; -+typedef __u32 __bitwise __le32; -+typedef __u32 __bitwise __be32; -+typedef __u64 __bitwise __le64; -+typedef __u64 __bitwise __be64; -+ - #include - - /* Reuse and abuse */ ---- ./second/fs/ufs.c.orig 2004-11-24 20:01:10.061702984 +0100 -+++ ./second/fs/ufs.c 2004-11-24 20:01:34.434997680 +0100 -@@ -33,6 +33,12 @@ - - struct inode { unsigned int blah; }; - -+/* for linux-2.6.9, from linux/types.h */ -+#include -+#ifndef pgoff_t -+#define pgoff_t unsigned long -+#endif -+ - #include - - /* Reuse and abuse */ diff --git a/package/sparc/silo/ufs.patch b/package/sparc/silo/ufs.patch new file mode 100644 index 000000000..0406d984e --- /dev/null +++ b/package/sparc/silo/ufs.patch @@ -0,0 +1,74 @@ +This is a part of the CLFS silo patch found at +http://svn.cross-lfs.org/svn/repos/cross-lfs/trunk/patches/silo-1.4.13-fixes-3.patch + +diff -Naur silo-1.4.13.orig/second/fs/ufs.c silo-1.4.13/second/fs/ufs.c +--- silo-1.4.13.orig/second/fs/ufs.c 2006-06-01 13:24:53.000000000 -0400 ++++ silo-1.4.13/second/fs/ufs.c 2007-04-03 17:02:53.000000000 -0400 +@@ -40,28 +40,18 @@ + + ino_t inode = 0; + +-#ifdef UFS_CIGAM +-/* Apparently new header */ +- + #define ufsi_size(x) ((unsigned int)((x)->ui_size)) + #define ufsi_db(x) ((unsigned int *)((x)->ui_u2.ui_addr.ui_db)) + #define ufsi_ib(x) ((unsigned int *)((x)->ui_u2.ui_addr.ui_ib)) + #define ufsd_namlen(x) ((unsigned char)((x)->d_u.d_44.d_namlen)) + +-#ifdef UFS_MINFREE +-/* Apparently even newer header */ +-#define ufs_superblock ufs_super_block ++struct ufs_superblock_full { ++ struct ufs_super_block_first first; ++ struct ufs_super_block_second second; ++ struct ufs_super_block_third third; ++}; ++#define ufs_superblock ufs_super_block_first + #define ufs_direct ufs_dir_entry +-#endif +- +-#else +- +-#define ufsi_size(x) (((x)->ui_size.val[1])) +-#define ufsi_db(x) ((unsigned int *)((x)->ui_db)) +-#define ufsi_ib(x) ((unsigned int *)((x)->ui_ib)) +-#define ufsd_namlen(x) ((unsigned char)((x)->d_namlen)) +- +-#endif + + #ifndef S_ISLNK + #include +@@ -92,25 +82,22 @@ + return p; + } + +-static struct ufs_superblock *ufs_read_super(ufs_filsys fs) ++static struct ufs_superblock_full *ufs_read_super(ufs_filsys fs) + { +- struct ufs_superblock *usb; ++ struct ufs_superblock_full *usb; + +- usb = (struct ufs_superblock *) malloc (2048); ++ usb = (struct ufs_superblock_full *) malloc (2048); + if (!usb) return 0; + if (io_channel_read_blk (fs->io, UFS_SBLOCK/1024, -2048, (char *)usb)) + return 0; +- if (usb->fs_magic != UFS_MAGIC) { +- /* XXX - replace hard-coded constant with a byte-swap macro */ +- if (usb->fs_magic == 0x54190100) { +- } ++ if (usb->third.fs_magic != UFS_MAGIC) { + return 0; + } +- if (usb->fs_bsize != UFS_BSIZE) ++ if (usb->first.fs_bsize != UFS_BSIZE) + return 0; +- if (usb->fs_fsize != UFS_FSIZE) ++ if (usb->first.fs_fsize != UFS_FSIZE) + return 0; +- io_channel_set_blksize (fs->io, usb->fs_fsize); ++ io_channel_set_blksize (fs->io, usb->first.fs_fsize); + return usb; + } +