Bug#201161: busybox-cvs: FTBFS on ia64
On Tue, Jul 15, 2003 at 02:25:31PM -0600, dann frazier wrote:
> On Mon, Jul 14, 2003 at 10:28:54PM +0200, Matt Kraai wrote:
> > This has been fixed upstream with the following patch.
> >
> > Would you care to test it?
>
> thanks Matt. the patch didn't apply cleanly, and what needed to be changed
> wasn't obvious. however, i did a co of the busybox module & built a deb
> from it using the packaging goo from the package in unstable. i interactively
> took the defaults for new config options, and can report that the deb built
> fine on ia64 w/ the rebuilt libc6.1-dev.
>
> i'm guessing this is a more relevant test than just the patch anyway, since i'd
> guess that the next functional release of busybox-cvs will likely be a new
> snapshot, not a patched version of the old snapshot. if that's not the case,
> i'll happily test another version of the patch.
Thanks for testing. In case the maintainer doesn't want to use a
new snapshot, would you please test the following, backported
patch?
--
Matt Kraai kraai@alumni.cmu.edu Debian GNU/Linux
--- busybox-cvs-0.60.99.cvs20030426.orig/util-linux/fdisk.c 2003-07-16 10:24:18.000000000 +0200
+++ busybox-cvs-0.60.99.cvs20030426/util-linux/fdisk.c 2003-07-16 10:11:06.000000000 +0200
@@ -838,87 +838,6 @@
#define SUN_SSWAP32(x) (sun_other_endian ? __swap32(x) \
: (uint32_t)(x))
-/*
- * llseek.c -- stub calling the llseek system call
- *
- * Copyright (C) 1994 Remy Card. This file may be redistributed
- * under the terms of the GNU Public License.
- */
-
-
-#ifdef __linux__
-
-/* Kernel headers before 2.1.mumble need this on the Alpha to get
- * _syscall* defined. */
-#define __LIBRARY__
-#include <sys/syscall.h>
-#if __GNU_LIBRARY__ < 5
-/* This is needed for libc5 */
-#include <asm/unistd.h>
-#endif
-
-static int _llseek( unsigned int fd, unsigned long offset_high, unsigned long offset_low, loff_t *result, unsigned int whence)
-{
- return(syscall(__NR__llseek, fd, offset_high, offset_low, result, whence));
-}
-
-static ext2_loff_t my_llseek (unsigned int f_d, ext2_loff_t offset,
- unsigned int origin)
-{
- ext2_loff_t result;
- int retval;
-
- retval = _llseek (f_d, ((unsigned long long) offset) >> 32,
- ((unsigned long long) offset) & 0xffffffff,
- &result, origin);
- return (retval == -1 ? (ext2_loff_t) retval : result);
-}
-
-static ext2_loff_t ext2_llseek (unsigned int f_d, ext2_loff_t offset,
- unsigned int origin)
-{
- ext2_loff_t result;
- static int do_compat = 0;
-
- if (!do_compat) {
- result = my_llseek (f_d, offset, origin);
- if (!(result == -1 && errno == ENOSYS))
- return result;
-
- /*
- * Just in case this code runs on top of an old kernel
- * which does not support the llseek system call
- */
- do_compat = 1;
- /*
- * Now try ordinary lseek.
- */
- }
-
- if ((sizeof(off_t) >= sizeof(ext2_loff_t)) ||
- (offset < ((ext2_loff_t) 1 << ((sizeof(off_t)*8) -1))))
- return lseek(f_d, (off_t) offset, origin);
-
- errno = EINVAL;
- return -1;
-}
-
-#else /* !linux */
-
-static ext2_loff_t ext2_llseek (unsigned int f_d, ext2_loff_t offset,
- unsigned int origin)
-{
- if ((sizeof(off_t) < sizeof(ext2_loff_t)) &&
- (offset >= ((ext2_loff_t) 1 << ((sizeof(off_t)*8) -1)))) {
- errno = EINVAL;
- return -1;
- }
- return lseek (f_d, (off_t) offset, origin);
-}
-
-#endif /* linux */
-
-
#ifdef CONFIG_FEATURE_OSF_LABEL
/*
Changes:
@@ -1443,7 +1362,7 @@
sector = get_start_sect(xbsd_part);
#endif
- if (ext2_llseek (fd, (ext2_loff_t) sector * SECTOR_SIZE, SEEK_SET) == -1)
+ if (lseek (fd, (ext2_loff_t) sector * SECTOR_SIZE, SEEK_SET) == -1)
fdisk_fatal (unable_to_seek);
if (BSD_BBSIZE != write (fd, disklabelbuffer, BSD_BBSIZE))
fdisk_fatal (unable_to_write);
@@ -1611,7 +1530,7 @@
sector = 0;
#endif
- if (ext2_llseek (fd, (ext2_loff_t) sector * SECTOR_SIZE, SEEK_SET) == -1)
+ if (lseek (fd, (ext2_loff_t) sector * SECTOR_SIZE, SEEK_SET) == -1)
fdisk_fatal (unable_to_seek);
if (BSD_BBSIZE != read (fd, disklabelbuffer, BSD_BBSIZE))
fdisk_fatal (unable_to_read);
@@ -1657,12 +1576,12 @@
#if defined (__alpha__) && BSD_LABELSECTOR == 0
alpha_bootblock_checksum (disklabelbuffer);
- if (ext2_llseek (fd, (ext2_loff_t) 0, SEEK_SET) == -1)
+ if (lseek (fd, (ext2_loff_t) 0, SEEK_SET) == -1)
fdisk_fatal (unable_to_seek);
if (BSD_BBSIZE != write (fd, disklabelbuffer, BSD_BBSIZE))
fdisk_fatal (unable_to_write);
#else
- if (ext2_llseek (fd, (ext2_loff_t) sector * SECTOR_SIZE + BSD_LABELOFFSET,
+ if (lseek (fd, (ext2_loff_t) sector * SECTOR_SIZE + BSD_LABELOFFSET,
SEEK_SET) == -1)
fdisk_fatal (unable_to_seek);
if (sizeof (struct xbsd_disklabel) != write (fd, d, sizeof (struct xbsd_disklabel)))
@@ -2097,7 +2016,7 @@
*/
sgiinfo*info = fill_sgiinfo(); /* fills the block appropriately */
int infostartblock = SGI_SSWAP32( sgilabel->directory[0].vol_file_start );
- if( ext2_llseek(fd, (ext2_loff_t)infostartblock*
+ if( lseek(fd, (ext2_loff_t)infostartblock*
SECTOR_SIZE, SEEK_SET) < 0 )
fdisk_fatal(unable_to_seek);
if( write(fd, info, SECTOR_SIZE) != SECTOR_SIZE )
@@ -3494,7 +3413,7 @@
static void
seek_sector(uint secno) {
ext2_loff_t offset = (ext2_loff_t) secno * sector_size;
- if (ext2_llseek(fd, offset, SEEK_SET) == (ext2_loff_t) -1)
+ if (lseek(fd, offset, SEEK_SET) == (ext2_loff_t) -1)
fdisk_fatal(unable_to_seek);
}
Reply to: