public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Binutils <binutils@sourceware.org>
Cc: Nick Clifton <nickc@redhat.com>
Subject: [PATCH] ld: fix build with old glibc / gcc
Date: Fri, 7 Jul 2023 14:01:07 +0200	[thread overview]
Message-ID: <d8cb6772-092f-b79e-421b-1da61ce020ac@suse.com> (raw)

"rename" conflicts with a function of that name, which gcc from that
same timeframe then complains about. Use a name matching that of
struct input_remap's respective field.
---
Nick, I expect this also wants to go on the branch.

--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -199,7 +199,7 @@ ldfile_add_remap_file (const char * file
 	  continue;
 	}
 
-      char * rename = p;
+      char * renamed = p;
 
       /* Advance past the rename entry.  */
       while (*p && *p != '=' && *p != ' ' && *p != '\t' && *p != '\f'
@@ -208,7 +208,7 @@ ldfile_add_remap_file (const char * file
       /* And terminate it.  */
       *p = '\0';
 
-      ldfile_add_remap (pattern, rename);
+      ldfile_add_remap (pattern, renamed);
     }
   while (! feof (f));
 

             reply	other threads:[~2023-07-07 12:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-07 12:01 Jan Beulich [this message]
2023-07-07 12:09 ` Nick Clifton
2023-07-07 12:12   ` Jan Beulich

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=d8cb6772-092f-b79e-421b-1da61ce020ac@suse.com \
    --to=jbeulich@suse.com \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).