summaryrefslogtreecommitdiffstats
path: root/src/db-itunes-parser.h
diff options
context:
space:
mode:
authorJorg Schuler <jcsjcs@users.sourceforge.net>2006-03-04 13:18:23 +0000
committerJorg Schuler <jcsjcs@users.sourceforge.net>2006-03-04 13:18:23 +0000
commitacece01d325781e8165e53a73e686aea8bebffe5 (patch)
tree99b5723d63cd32340dea3e281041deef32cd5bcb /src/db-itunes-parser.h
parent905fba1f0b04dc26ab0bc985529f1633dacea423 (diff)
downloadlibgpod-acece01d325781e8165e53a73e686aea8bebffe5.tar.gz
libgpod-acece01d325781e8165e53a73e686aea8bebffe5.tar.xz
libgpod-acece01d325781e8165e53a73e686aea8bebffe5.zip
* configure.ac: bumped version to 0.3.2 for release.
* db-artwork-writer.c: increased IPOD_MMAP_SIZE from 2 to 16 MB as a temporary workaround until a propoer solution can be implemented. * db-itunes-parser.h: replaced the #pragma pack(4) with an 'packed' attribute on _MhiiHeader only. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1211 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'src/db-itunes-parser.h')
-rw-r--r--src/db-itunes-parser.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/db-itunes-parser.h b/src/db-itunes-parser.h
index a51af8b..bdd8498 100644
--- a/src/db-itunes-parser.h
+++ b/src/db-itunes-parser.h
@@ -29,12 +29,6 @@
#include <glib.h>
/*#include "ipod-db-parser.h"*/
-/* Make sure that 64bit integers do not get padded */
-/* FIXME: Obviously, this could also affect 16bit and 32bit integers,
- but so far all 32bit inters seem to be aligned correctly without
- padding. */
-#pragma pack(4)
-
#define ITUNESDB_MAX_SIZE 10 * 1024 * 1024
struct _MHeader {
@@ -529,7 +523,12 @@ struct _MhiiHeader {
gint32 unknown8;
gint32 orig_img_size;
unsigned char padding[];
-};
+} __attribute__((__packed__));
+/* I we don't put the 'packed' attribute above, some 64 bit systems
+ * will pad the 64 bit integer to be aligned to an 8-byte boundary.
+ * Hopefully there won't be any systems around that crash when
+ * accessing 64 bit integers not aligned to 8-byte boundaries. */
+
struct _MhniHeader {
unsigned char header_id[4];