--- src/sbin/gpt/migrate.c 2007/06/17 23:50:15 1.2 +++ src/sbin/gpt/migrate.c 2007/06/18 05:13:39 1.3 @@ -28,7 +28,7 @@ */ #include -#include +#include #include #include @@ -68,15 +68,15 @@ static struct gpt_ent* migrate_disklabel(int fd, off_t start, struct gpt_ent *ent) { char *buf; - struct disklabel *dl; + struct disklabel32 *dl; off_t ofs, rawofs; int i; - buf = gpt_read(fd, start + LABELSECTOR, 1); - dl = (void*)(buf + LABELOFFSET); + buf = gpt_read(fd, start + LABELSECTOR32, 1); + dl = (void*)(buf + LABELOFFSET32); - if (le32toh(dl->d_magic) != DISKMAGIC || - le32toh(dl->d_magic2) != DISKMAGIC) { + if (le32toh(dl->d_magic) != DISKMAGIC32 || + le32toh(dl->d_magic2) != DISKMAGIC32) { warnx("%s: warning: FreeBSD slice without disklabel", device_name); return (ent);