tags 428936 patch stop Hi,
On Fri, Jun 15, 2007 at 08:40:28AM +0200, Lucas Nussbaum wrote: > During a rebuild of all packages in sid, your package failed to build on i386. > > Relevant part: > make[1]: Entering directory `/build/user/nictools-pci-1.3.8' > gcc -O -Wall -Wstrict-prototypes -o alta-diag alta-diag.c \ > -DLIBFLASH libflash.c -DLIBMII libmii.c > alta-diag.c:87:27: error: asm/unaligned.h: No such file or directory The file asm/unaligned.h was previously provided by the package linux-kernel-headers which, according to [0] is not available any more. Its replacement package linux-libc-dev, which provides some of the files in /usr/include/asm previously provided by linux-kernel-headers, doesn't provide this file any more. 0. http://lists.debian.org/debian-glibc/2007/07/msg00094.html I then looked for a newer version of the nictools, but at the download location given in debian/copyright I didn't find any nictools at all - upstream seems to be dead (reported as bug #435190). As the file asm/unaligned.h available in etch's linux-kernel-headers isn't that big and as it seems to do nothing really kernel specific magic stuff I simply copied it (and recursively its inner included files) into a new file unaligned.h and altered all relevant source files to include this header file instead of the one not available in /usr/include any more. The patch is attached to this message. I know that this is a quite ugly workaround because it messes around with upstream source, but to the best of my knowledge it seems to close the bug. And if there really is no upstream source anymore this is probably okay... I hope this patch is of any help Greetings Micha
diff -Naur nictools-pci-1.3.8.orig/alta-diag.c nictools-pci-1.3.8/alta-diag.c --- nictools-pci-1.3.8.orig/alta-diag.c 2007-07-30 00:30:04.000000000 +0200 +++ nictools-pci-1.3.8/alta-diag.c 2007-07-30 00:20:13.000000000 +0200 @@ -84,7 +84,7 @@ /* The following are required only with unaligned field accesses. */ #include <asm/types.h> -#include <asm/unaligned.h> +#include "unaligned.h" #if defined(__linux__) && __GNU_LIBRARY__ == 1 #include <asm/io.h> /* Newer libraries use <sys/io.h> instead. */ diff -Naur nictools-pci-1.3.8.orig/debian/changelog nictools-pci-1.3.8/debian/changelog --- nictools-pci-1.3.8.orig/debian/changelog 2007-07-30 00:30:04.000000000 +0200 +++ nictools-pci-1.3.8/debian/changelog 2007-07-30 00:22:59.000000000 +0200 @@ -1,3 +1,12 @@ +nictools-pci (1.3.8-1.1) unstable; urgency=low + + * Non-maintainer upload. + * provide linux macros set_unaligned() and get_unaligned() in new file + unaligned.h previously provided by package linux-libc-dev + (closes: #428936) + + -- Micha Lenk <[EMAIL PROTECTED]> Mon, 30 Jul 2007 00:20:32 +0200 + nictools-pci (1.3.8-1) unstable; urgency=low * New Upstream: rtl8139-diag v2.13 diff -Naur nictools-pci-1.3.8.orig/myson-diag.c nictools-pci-1.3.8/myson-diag.c --- nictools-pci-1.3.8.orig/myson-diag.c 2007-07-30 00:30:04.000000000 +0200 +++ nictools-pci-1.3.8/myson-diag.c 2007-07-30 00:20:13.000000000 +0200 @@ -83,7 +83,7 @@ /* The following are required only with unaligned field accesses. */ #include <asm/types.h> -#include <asm/unaligned.h> +#include "unaligned.h" #if defined(__linux__) && __GNU_LIBRARY__ == 1 #include <asm/io.h> /* Newer libraries use <sys/io.h> instead. */ diff -Naur nictools-pci-1.3.8.orig/natsemi-diag.c nictools-pci-1.3.8/natsemi-diag.c --- nictools-pci-1.3.8.orig/natsemi-diag.c 2007-07-30 00:30:04.000000000 +0200 +++ nictools-pci-1.3.8/natsemi-diag.c 2007-07-30 00:20:13.000000000 +0200 @@ -92,7 +92,7 @@ /* The following are required only with unaligned field accesses. */ #include <asm/types.h> -#include <asm/unaligned.h> +#include "unaligned.h" #if defined(__linux__) && __GNU_LIBRARY__ == 1 #include <asm/io.h> /* Newer libraries use <sys/io.h> instead. */ diff -Naur nictools-pci-1.3.8.orig/ns820-diag.c nictools-pci-1.3.8/ns820-diag.c --- nictools-pci-1.3.8.orig/ns820-diag.c 2005-07-10 15:25:56.000000000 +0200 +++ nictools-pci-1.3.8/ns820-diag.c 2007-07-30 00:20:13.000000000 +0200 @@ -85,7 +85,7 @@ /* The following are required only with unaligned field accesses. */ #include <asm/types.h> -#include <asm/unaligned.h> +#include "unaligned.h" #if defined(__linux__) && __GNU_LIBRARY__ == 1 #include <asm/io.h> /* Newer libraries use <sys/io.h> instead. */ diff -Naur nictools-pci-1.3.8.orig/pcnet-diag.c nictools-pci-1.3.8/pcnet-diag.c --- nictools-pci-1.3.8.orig/pcnet-diag.c 2007-07-30 00:30:04.000000000 +0200 +++ nictools-pci-1.3.8/pcnet-diag.c 2007-07-30 00:20:13.000000000 +0200 @@ -88,7 +88,7 @@ #include <errno.h> #include <asm/types.h> -#include <asm/unaligned.h> +#include "unaligned.h" #if defined(__linux__) && __GNU_LIBRARY__ == 1 #include <asm/io.h> diff -Naur nictools-pci-1.3.8.orig/tulip-diag.c nictools-pci-1.3.8/tulip-diag.c --- nictools-pci-1.3.8.orig/tulip-diag.c 2007-07-30 00:30:04.000000000 +0200 +++ nictools-pci-1.3.8/tulip-diag.c 2007-07-30 00:20:13.000000000 +0200 @@ -91,7 +91,7 @@ #include <ctype.h> #include <asm/types.h> -#include <asm/unaligned.h> +#include "unaligned.h" #if defined(__linux__) && __GNU_LIBRARY__ == 1 #include <asm/io.h> /* Newer libraries use <sys/io.h> instead. */ diff -Naur nictools-pci-1.3.8.orig/unaligned.h nictools-pci-1.3.8/unaligned.h --- nictools-pci-1.3.8.orig/unaligned.h 1970-01-01 01:00:00.000000000 +0100 +++ nictools-pci-1.3.8/unaligned.h 2007-07-30 01:06:03.000000000 +0200 @@ -0,0 +1,37 @@ +/** + * These lines of codes were obtained from Debian package linux-kernel-headers + * and adapted by Micha Lenk <[EMAIL PROTECTED]> to meet the needs of + * nictools-pci. The package linux-kernel-headers in turn obtained the sources + * via BitKeeper from: bk://linux.bkbits.net/linux-2.5, and kernel.org mirrors + * under the terms of the GPL license. + */ + +#ifndef __UNALIGNED_H +#define __UNALIGNED_H + +/** + * get_unaligned - get value from possibly mis-aligned location + * @ptr: pointer to value + * + * This macro should be used for accessing values larger in size than + * single bytes at locations that are expected to be improperly aligned, + * e.g. retrieving a u16 value from a location not u16-aligned. + * + * Note that unaligned accesses can be very expensive on some architectures. + */ +#define get_unaligned(ptr) (*(ptr)) + +/** + * put_unaligned - put value to a possibly mis-aligned location + * @val: value to place + * @ptr: pointer to location + * + * This macro should be used for placing values larger in size than + * single bytes at locations that are expected to be improperly aligned, + * e.g. writing a u16 value to a location not u16-aligned. + * + * Note that unaligned accesses can be very expensive on some architectures. + */ +#define put_unaligned(val, ptr) ((void)( *(ptr) = (val) )) + +#endif diff -Naur nictools-pci-1.3.8.orig/via-diag.c nictools-pci-1.3.8/via-diag.c --- nictools-pci-1.3.8.orig/via-diag.c 2007-07-30 00:30:04.000000000 +0200 +++ nictools-pci-1.3.8/via-diag.c 2007-07-30 00:20:13.000000000 +0200 @@ -92,7 +92,7 @@ /* The following are required only with unaligned field accesses. */ #include <asm/types.h> -#include <asm/unaligned.h> +#include "unaligned.h" #if defined(__linux__) && __GNU_LIBRARY__ == 1 #include <asm/io.h> /* Newer libraries use <sys/io.h> instead. */
signature.asc
Description: Digital signature