From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1386) id 3023E3AC211A; Fri, 7 Jul 2023 12:10:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3023E3AC211A Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Jan Beulich To: bfd-cvs@sourceware.org Subject: [binutils-gdb] ld: fix build with old glibc / gcc X-Act-Checkin: binutils-gdb X-Git-Author: Jan Beulich X-Git-Refname: refs/heads/master X-Git-Oldrev: 13aa307c9a9086d34b555cecf5f9388fa9b062f1 X-Git-Newrev: eae2847fbff56657a5d14909b574ab8ea718ee08 Message-Id: <20230707121031.3023E3AC211A@sourceware.org> Date: Fri, 7 Jul 2023 12:10:30 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2023 12:21:34 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Deae2847fbff5= 6657a5d14909b574ab8ea718ee08 commit eae2847fbff56657a5d14909b574ab8ea718ee08 Author: Jan Beulich Date: Fri Jul 7 14:10:21 2023 +0200 ld: fix build with old glibc / gcc =20 "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. Diff: --- ld/ldfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ld/ldfile.c b/ld/ldfile.c index 9d9c036dfab..df7c9cbd65e 100644 --- a/ld/ldfile.c +++ b/ld/ldfile.c @@ -199,7 +199,7 @@ ldfile_add_remap_file (const char * file) continue; } =20 - char * rename =3D p; + char * renamed =3D p; =20 /* Advance past the rename entry. */ while (*p && *p !=3D '=3D' && *p !=3D ' ' && *p !=3D '\t' && *p !=3D= '\f' @@ -208,7 +208,7 @@ ldfile_add_remap_file (const char * file) /* And terminate it. */ *p =3D '\0'; =20 - ldfile_add_remap (pattern, rename); + ldfile_add_remap (pattern, renamed); } while (! feof (f));