Include endian and gcc4 fixes.

This commit is contained in:
Matthias Saou 2005-05-03 13:39:55 +00:00
parent 385d4ecec3
commit ba8184c5e8
4 changed files with 98 additions and 6 deletions

View File

@ -0,0 +1,36 @@
Date: Sun, 12 Dec 2004 14:25:09 +0100
From: Christoph Hellwig <hch@lst.de>
To: submit@bugs.debian.org
Package: udftools
Version: 1.0.0b3-6
mkduffs crashes with a segmentation fault when trying to create a
filesystem on big-endian systems. e.g. mkudffs /dev/sda4 on my
PowerMac.
udffstools from CVS on sf.net is fine, and I've extracted the actual
fix:
diff -uNr -Xdontdiff -p udftools-1.0.0b3/mkudffs/mkudffs.c udftools/mkudffs/mkudffs.c
--- udftools-1.0.0b3/mkudffs/mkudffs.c 2004-02-23 04:35:33.000000000 +0100
+++ udftools/mkudffs/mkudffs.c 2004-03-02 03:09:39.000000000 +0100
@@ -250,14 +250,14 @@ void split_space(struct udf_disc *disc)
if (size % offsets[PSPACE_SIZE])
size -= (size % offsets[PSPACE_SIZE]);
set_extent(disc, PSPACE, start, size);
- for (i=0; i<disc->udf_lvd[0]->numPartitionMaps; i++)
+ for (i=0; i<le32_to_cpu(disc->udf_lvd[0]->numPartitionMaps); i++)
{
if (i == 1)
disc->udf_lvid->freeSpaceTable[i] = cpu_to_le32(0xFFFFFFFF);
else
disc->udf_lvid->freeSpaceTable[i] = cpu_to_le32(size);
}
- for (j=0; j<disc->udf_lvd[0]->numPartitionMaps; j++)
+ for (j=0; j<le32_to_cpu(disc->udf_lvd[0]->numPartitionMaps); j++)
{
if (j == 1)
disc->udf_lvid->sizeTable[i+j] = cpu_to_le32(0xFFFFFFFF);

View File

@ -0,0 +1,53 @@
Subject: Bug#288621: udftools: FTBFS (amd64/gcc-4.0): invalid lvalue in assignment
From: Andreas Jochens <aj@andaco.de>
Message-Id: <E1CltQT-00068G-Sy@localhost.localdomain>
Date: Tue, 04 Jan 2005 19:29:01 +0100
Lines: 59
Package: udftools
Severity: normal
Tags: patch
When building 'udftools' on amd64 with gcc-4.0,
I get the following error:
wrudf.c:119: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
wrudf.c:119: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
wrudf.c:119: warning: pointer targets in passing argument 1 of 'strcmp' differ in signedness
wrudf.c:119: warning: pointer targets in passing argument 1 of 'strncmp' differ in signedness
wrudf.c:230: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
wrudf.c:230: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
wrudf.c:230: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
wrudf.c:230: warning: pointer targets in passing argument 1 of 'strcmp' differ in signedness
wrudf.c:230: warning: pointer targets in passing argument 1 of 'strncmp' differ in signedness
wrudf.c:245: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
wrudf.c:245: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
wrudf.c:245: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
wrudf.c:245: warning: pointer targets in passing argument 1 of 'strcmp' differ in signedness
wrudf.c:245: warning: pointer targets in passing argument 1 of 'strncmp' differ in signedness
wrudf.c:248: error: invalid lvalue in assignment
make[2]: *** [wrudf.o] Error 1
make[2]: Leaving directory `/udftools-1.0.0b3/wrudf'
With the attached patch 'udftools' can be compiled
on amd64 using gcc-4.0.
The patch also changes the Build-Depends from 'libreadline4-dev'
to 'libreadline5-dev'.
Regards
Andreas Jochens
diff -urN ../tmp-orig/udftools-1.0.0b3/wrudf/wrudf.c ./wrudf/wrudf.c
--- ../tmp-orig/udftools-1.0.0b3/wrudf/wrudf.c 2002-11-26 08:18:51.000000000 +0100
+++ ./wrudf/wrudf.c 2005-01-04 16:56:49.394078200 +0100
@@ -245,7 +245,7 @@
} else if( strncmp( spm->partIdent.ident, UDF_ID_VIRTUAL, strlen(UDF_ID_VIRTUAL)) == 0 )
virtualPartitionNum = i;
}
- (char*)spm += spm->partitionMapLength;
+ spm = (char*)spm + spm->partitionMapLength;
}
if( medium == CDR ) {
diff -urN ../tmp-orig/udftools-1.0.0b3/debian/control ./debian/control

View File

@ -1,13 +1,14 @@
Summary: Linux UDF Filesystem userspace utilities
Name: udftools
Version: 1.0.0b3
Release: 2
Release: 3
License: GPL
Group: Applications/Archiving
URL: http://sourceforge.net/projects/linux-udf/
Source: http://dl.sf.net/linux-udf/udftools-%{version}.tar.gz
Patch: udftools-1.0.0b3.patch
Patch0: udftools-1.0.0b3-pktsetup-chardev.patch
Patch1: udftools-1.0.0b3-mkudffs-bigendian.patch
Patch2: udftools-1.0.0b3-wrudf-gcc4.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: readline-devel
@ -17,7 +18,9 @@ Linux UDF Filesystem userspace utilities.
%prep
%setup
%patch -p1
%patch0 -p1 -b .pktsetup-chardev
%patch1 -p1 -b .mkudffs-bigendian
%patch2 -p1 -b .wrudf-gcc4
%build
@ -44,8 +47,8 @@ Linux UDF Filesystem userspace utilities.
%changelog
* Fri Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
- rebuilt
* Tue May 3 2005 Matthias Saou <http://freshrpms.net/> 1.0.0b3-3
- Include patches to fix big endian issue and gcc4 compile.
* Mon Feb 7 2005 Matthias Saou <http://freshrpms.net/> 1.0.0b3-1
- Initial RPM release, based on spec file from John Treacy.