summaryrefslogtreecommitdiffstats
path: root/fdisk/fdisk.h
diff options
context:
space:
mode:
Diffstat (limited to 'fdisk/fdisk.h')
-rw-r--r--fdisk/fdisk.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/fdisk/fdisk.h b/fdisk/fdisk.h
index 6daadd90b..13c07147b 100644
--- a/fdisk/fdisk.h
+++ b/fdisk/fdisk.h
@@ -29,6 +29,12 @@
extern long long ext2_llseek(unsigned int fd, long long offset,
unsigned int origin);
+#if defined(__GNUC__) && (defined(__arm__) || defined(__alpha__))
+# define PACKED __attribute__ ((packed))
+#else
+# define PACKED
+#endif
+
struct partition {
unsigned char boot_ind; /* 0x80 - active */
unsigned char head; /* starting head */
@@ -40,7 +46,7 @@ struct partition {
unsigned char end_cyl; /* end cylinder */
unsigned char start4[4]; /* starting sector counting from 0 */
unsigned char size4[4]; /* nr of sectors in partition */
-};
+} PACKED;
enum failure {usage, usage2, ioctl_error,
unable_to_open, unable_to_read, unable_to_seek,