Define __packed

Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
This commit is contained in:
Dmitry Kasatkin 2013-11-12 19:27:05 +02:00
parent 20f1837d51
commit afcef2b493

View File

@ -92,6 +92,8 @@
#define FS_IOC32_GETFLAGS _IOR('f', 1, int) #define FS_IOC32_GETFLAGS _IOR('f', 1, int)
#define FS_IOC32_SETFLAGS _IOW('f', 2, int) #define FS_IOC32_SETFLAGS _IOW('f', 2, int)
#define __packed __attribute__((packed))
struct h_misc { struct h_misc {
unsigned long ino; unsigned long ino;
uint32_t generation; uint32_t generation;
@ -122,7 +124,7 @@ struct pubkey_hdr {
uint8_t algo; uint8_t algo;
uint8_t nmpi; uint8_t nmpi;
char mpi[0]; char mpi[0];
} __attribute__ ((packed)); } __packed;
struct signature_hdr { struct signature_hdr {
uint8_t version; /* signature format version */ uint8_t version; /* signature format version */
@ -132,7 +134,7 @@ struct signature_hdr {
uint8_t keyid[8]; uint8_t keyid[8];
uint8_t nmpi; uint8_t nmpi;
char mpi[0]; char mpi[0];
} __attribute__ ((packed)); } __packed;
enum pkey_hash_algo { enum pkey_hash_algo {
PKEY_HASH_MD4, PKEY_HASH_MD4,
@ -166,7 +168,7 @@ struct signature_v2_hdr {
uint32_t keyid; /* IMA key identifier - not X509/PGP specific*/ uint32_t keyid; /* IMA key identifier - not X509/PGP specific*/
uint16_t sig_size; /* signature size */ uint16_t sig_size; /* signature size */
uint8_t sig[0]; /* signature payload */ uint8_t sig[0]; /* signature payload */
} __attribute__ ((packed)); } __packed;
/* /*