--- mkinitrd-4.2.0.3/grubby.orig/grubby.c 2009-05-26 22:40:40.000000000 -0700 +++ mkinitrd-4.2.0.3/grubby/grubby.c 2009-05-26 22:40:19.000000000 -0700 @@ -32,6 +32,9 @@ #define CODE_SEG_SIZE 128 /* code segment checked by --bootloader-probe */ +/* Already strndup is defined in gcc-4.4 ? */ +#define strndup _strndup + /* comments get lumped in with indention */ struct lineElement { char * item; @@ -1753,7 +1756,7 @@ return 2; } -int checkLiloOnRaid(char * mdDev, const char * boot) { +int checkLiloOnRaid(char * mdDev, const unsigned char * boot) { int fd; char buf[65536]; char * end; @@ -1848,7 +1851,7 @@ int checkForLilo(struct grubConfig * config) { int fd; - unsigned char boot[512]; + const unsigned char boot[512]; struct singleLine * line; for (line = config->theLines; line; line = line->next) @@ -1869,7 +1872,7 @@ return 1; } - if (read(fd, boot, 512) != 512) { + if (read(fd, (void *) boot, 512) != 512) { fprintf(stderr, _("grubby: unable to read %s: %s\n"), "/boot/boot.b", strerror(errno)); return 1;