Grub Development Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: grub-devel@gnu.org
Cc: bug-hurd@gnu.org
Subject: [PATCH] Fix getroot.c build on GNU/Hurd
Date: Sun, 18 Oct 2026 17:30:39 +0200	[thread overview]
Message-ID: <atTmH9-F9k0DnvLc@end> (raw)

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.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

diff --git a/util/getroot.c b/util/getroot.c
index 75a7d5f21..05a2414fe 100644
--- a/util/getroot.c
+++ b/util/getroot.c
@@ -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
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

             reply	other threads:[~2026-10-18 15:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-18 15:30 Samuel Thibault [this message]
2026-10-19 15:53 ` [PATCH] Fix getroot.c build on GNU/Hurd Mike Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=atTmH9-F9k0DnvLc@end \
    --to=samuel.thibault@ens-lyon.org \
    --cc=bug-hurd@gnu.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox