The package won't build in mock: In file included from ../include/reiserfs_lib.h:14, from includes.h:12, from do_balan.c:20: ../include/reiserfs_fs.h:41:27: error: asm/unaligned.h: No such file or directory In file included from ../include/reiserfs_lib.h:14, from includes.h:12, from fix_node.c:40: ../include/reiserfs_fs.h:41:27: error: asm/unaligned.h: No such file or directory make[1]: *** [do_balan.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [fix_node.o] Error 1 make[1]: Leaving directory `/builddir/build/BUILD/reiserfsprogs-3.6.19/reiserfscore' make: *** [all-recursive] Error 1 error: Bad exit status from /var/tmp/rpm-tmp.96233 (%build)
asm/aligned.h isn't in the latest glibc-kernheaders.
Intentionally so. There's nothing in there which describes kernel<->user ABI, and the kernel headers are not a random library of arbitrary crap for userspace to use. That said, reiserfs_fs.h is a steaming pile of crap which could do with some more cleanup -- or preferably just being removed from public view if the reiserfs tools have their own version. I'll investigate that.
Ew, reiserfs-utils doesn't even build on PPC, with a comment that it's been endian-broken since some time in 2002. It also has its own copy of reiserfs_fs.h, and if I remove the broken inclusion of <asm/unaligned.h> from that, then it does seem to build. Not a glibc-kernheaders problem.
it's needed for ia64, because it's "speshul"
Not from kernel-private headers. Just dereference a packed structure containing an int of the appropriate size.
if you want to rewrite reiserfsprogs, be my guest, but it's probably a smaller change to include a package-private copy of unaligned.h It's not like reiserfs is even supported by us anyway, so putting a huge amount of effort into fixing it isn't a worthwhile use of time IMO. After getting it building again, it's a really good candidate for kicking out to fedora-extras.
The bluez-libs package has a something suitable for use in a package-private reimplementation of unaligned.h, and it doesn't need anything arch-specific... #define bt_get_unaligned(ptr) \ ({ \ struct __attribute__((packed)) { \ typeof(*(ptr)) __v; \ } *__p = (void *)(ptr); \ __p->__v; \ }) #define bt_put_unaligned(val, ptr) \ do { \ struct __attribute__((packed)) { \ typeof(*(ptr)) __v; \ } *__p = (void *)(ptr); \ __p->__v = (val); \ } while(0) On machines like i386 this behaves just like a straight dereference; on machines which can't handle misaligned loads, GCC emits the correct code.
sounds good. I'll see if I can munge reiserfsprogs to use something similar.
Fixed, and compiled.