]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fixes memory alignment problems on Sparc64.
authorOndrej Zajicek <santiago@crfreenet.org>
Mon, 6 Jul 2009 17:07:01 +0000 (19:07 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Mon, 6 Jul 2009 17:07:01 +0000 (19:07 +0200)
Not quite standard construction, i should add
some autoconf macro.

Not tested yet.

lib/mempool.c
lib/resource.c
lib/slab.c

index bb6dcff33ce2dba792c75f0a8bbc88c3a5fc2d8a..e6f277b9d6dc99bd590a96e9e2d4cca6d88eea8a 100644 (file)
@@ -27,6 +27,7 @@
 struct lp_chunk {
   struct lp_chunk *next;
   unsigned int size;
+  uintptr_t data_align[0];
   byte data[0];
 };
 
index 289af9332e94a1d1b38526cf4ee322e2df1fa935..8f91450cad4e304f5f33277586b095e8d357d793 100644 (file)
@@ -250,6 +250,7 @@ resource_init(void)
 struct mblock {
   resource r;
   unsigned size;
+  uintptr_t data_align[0];
   byte data[0];
 };
 
index 568f01a48734ea98dde82b2a1ed76f7a8e50c201..17511d218a9ae78b4ec747f9e0b0dca441148458 100644 (file)
@@ -62,6 +62,7 @@ static struct resclass sl_class = {
 
 struct sl_obj {
   node n;
+  uintptr_t data_align[0];
   byte data[0];
 };