diff --git a/ChangeLog b/ChangeLog index d96393950..95b00cddc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-02-29 Vladimir Serbinenko + + * util/getroot.c [__APPLE__]: Add missing includes. + (grub_util_biosdisk_is_floppy): Fix usage of undefined variable. + 2012-02-29 Vladimir Serbinenko * util/grub-mkimage.c (generate_image): Silence spurious warning. diff --git a/util/getroot.c b/util/getroot.c index 7bb547a35..499c0b5da 100644 --- a/util/getroot.c +++ b/util/getroot.c @@ -114,6 +114,9 @@ #if defined(__APPLE__) # include +# include +# include +# include #endif #ifdef HAVE_DEVICE_MAPPER @@ -1523,10 +1526,10 @@ grub_util_biosdisk_is_floppy (grub_disk_t disk) #else /* Some kernels (e.g. kFreeBSD) don't have a static major number for floppies, but they still use a "fd[0-9]" pathname. */ - if (map[disk->id].device[5] == 'f' - && map[disk->id].device[6] == 'd' - && map[disk->id].device[7] >= '0' - && map[disk->id].device[7] <= '9') + if (dname[5] == 'f' + && dname[6] == 'd' + && dname[7] >= '0' + && dname[7] <= '9') #endif return 1;