Skip to contentSkip to conversation

Fix getroot.c build on GNU/Hurd

PATCH In review Samuel Thibault 2 participants 2 messages Oct 18 – Oct 19

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix getroot.c build on GNU/Hurd

os_dev is a const char *, and with recent glibc the qualifier gets propagated through strrchr below, so p needs to be qualified const as well.

util/getroot.c +1 -1
index 75a7d5f21..05a2414fe 100644
@@ -351,7 +351,7 @@ grub_util_biosdisk_get_grub_dev (const char *os_dev)
      */
     if (ctx.start == (grub_disk_addr_t) -1)
       {
-	char *p;
+	const char *p;
 	char *dri;
 
 	dri = make_device_name (drive);

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#1 lore raw
Quoted 21 lines · Samuel Thibault

os_dev is a const char *, and with recent glibc the qualifier gets propagated through strrchr below, so p needs to be qualified const as well.

util/getroot.c +1 -1
index 75a7d5f21..05a2414fe 100644
@@ -351,7 +351,7 @@ grub_util_biosdisk_get_grub_dev (const char *os_dev)
      */
     if (ctx.start == (grub_disk_addr_t) -1)
       {
-       char *p;
+       const char *p;
        char *dri;
 
        dri = make_device_name (drive);
Quoted 4 lines

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

GRUB development has moved to freedesktop.org. Please submit patches there.

https://gitlab.freedesktop.org/gnu-grub/grub/

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel