summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2013-12-12 13:38:32 +0100
committerAdrian Dudau <adrian.dudau@enea.com>2013-12-12 13:50:20 +0100
commite2e6f6fe07049f33cb6348780fa975162752e421 (patch)
treeb1813295411235d1297a0ed642b1346b24fdfb12 /meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch
downloadpoky-e2e6f6fe07049f33cb6348780fa975162752e421.tar.gz
initial commit of Enea Linux 3.1
Migrated from the internal git server on the dora-enea branch Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch')
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch b/meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch
new file mode 100644
index 0000000000..b46b2db0a3
--- /dev/null
+++ b/meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch
@@ -0,0 +1,38 @@
1The problem is that unsigned char[2] is
2guranteed to be 8Bit aligned on arm
3but unsigned short is/needs to be 16bit aligned
4the union { unsigned short; unsigned char[2] } trick
5didn't work so no we use the alpha hack.
6
7memcpy into an 16bit aligned
8
9 -zecke
10
11Upstream-Status: Inappropriate [licensing]
12We're tracking an old release of dosfstools due to licensing issues.
13
14Signed-off-by: Scott Garman <scott.a.garman@intel.com>
15
16--- dosfstools/dosfsck/boot.c.orig 2003-05-15 19:32:23.000000000 +0200
17+++ dosfstools/dosfsck/boot.c 2003-06-13 17:44:25.000000000 +0200
18@@ -36,17 +36,15 @@
19 { 0xff, "5.25\" 320k floppy 2s/40tr/8sec" },
20 };
21
22-#if defined __alpha || defined __ia64__ || defined __s390x__ || defined __x86_64__ || defined __ppc64__
23+
24 /* Unaligned fields must first be copied byte-wise */
25 #define GET_UNALIGNED_W(f) \
26 ({ \
27 unsigned short __v; \
28 memcpy( &__v, &f, sizeof(__v) ); \
29- CF_LE_W( *(unsigned short *)&f ); \
30+ CF_LE_W( *(unsigned short *)&__v ); \
31 })
32-#else
33-#define GET_UNALIGNED_W(f) CF_LE_W( *(unsigned short *)&f )
34-#endif
35+
36
37
38 static char *get_media_descr( unsigned char media )