Took care of alignments needed on some processors

This commit is contained in:
Jean-Pierre André 2010-11-09 09:43:31 +01:00
parent a70e40021d
commit 48caa7a45e
3 changed files with 10 additions and 1 deletions

View File

@ -183,6 +183,7 @@ struct POSIX_SECURITY {
int defcnt;
int firstdef;
u16 tagsset;
s32 alignment[0];
struct POSIX_ACL acl;
} ;

View File

@ -62,6 +62,10 @@
#include "logging.h"
#include "misc.h"
#undef le16_to_cpup
/* the standard le16_to_cpup() crashes for unaligned data on some processors */
#define le16_to_cpup(p) (*(u8*)(p) + (((u8*)(p))[1] << 8))
/**
* enum ntfs_compression_constants - constants used in the compression code
*/

View File

@ -107,7 +107,11 @@
*/
typedef struct {
GUID object_id;
union {
/* alignment may be needed to evaluate collations */
u32 alignment;
GUID guid;
} object_id;
} OBJECT_ID_INDEX_KEY;
typedef struct {