1 The problem is that unsigned char[2] is
2 guranteed to be 8Bit aligned on arm
3 but unsigned short is/needs to be 16bit aligned
4 the union { unsigned short; unsigned char[2] } trick
5 didn't work so no we use the alpha hack.
7 memcpy into an 16bit aligned
12 --- dosfstools/dosfsck/boot.c.orig 2003-05-15 19:32:23.000000000 +0200
13 +++ dosfstools/dosfsck/boot.c 2003-06-13 17:44:25.000000000 +0200
15 { 0xff, "5.25\" 320k floppy 2s/40tr/8sec" },
18 -#if defined __alpha || defined __ia64__ || defined __s390x__ || defined __x86_64__ || defined __ppc64__
20 /* Unaligned fields must first be copied byte-wise */
21 #define GET_UNALIGNED_W(f) \
24 memcpy( &__v, &f, sizeof(__v) ); \
25 - CF_LE_W( *(unsigned short *)&f ); \
26 + CF_LE_W( *(unsigned short *)&__v ); \
29 -#define GET_UNALIGNED_W(f) CF_LE_W( *(unsigned short *)&f )
34 static char *get_media_descr( unsigned char media )