From patchwork Fri Dec 1 18:03:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lu, Hongjiu" X-Patchwork-Id: 24678 Received: (qmail 83097 invoked by alias); 1 Dec 2017 18:03:12 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 83088 invoked by uid 89); 1 Dec 2017 18:03:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, KB_WAM_FROM_NAME_SINGLEWORD, NO_DNS_FOR_FROM, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:798 X-HELO: mga06.intel.com X-ExtLoop1: 1 Date: Fri, 1 Dec 2017 10:03:07 -0800 From: "H.J. Lu" To: GNU C Library Subject: [PATCH] nios2: Don't use MIN in dl-machine.h Message-ID: <20171201180307.GA8255@gmail.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.1 (2017-09-22) MIN is used, but param.h may not be included, so expand its single use inline. OK for master? H.J. --- * sysdeps/nios2/dl-machine.h (elf_machine_rela): Expand MIN. --- sysdeps/nios2/dl-machine.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/nios2/dl-machine.h b/sysdeps/nios2/dl-machine.h index b5fdd9b2bd..67d8c899a7 100644 --- a/sysdeps/nios2/dl-machine.h +++ b/sysdeps/nios2/dl-machine.h @@ -271,7 +271,8 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, strtab + refsym->st_name); } memcpy (reloc_addr_arg, (void *) value, - MIN (sym->st_size, refsym->st_size)); + sym->st_size < refsym->st_size + ? sym->st_size : refsym->st_size); break; case R_NIOS2_GLOB_DAT: case R_NIOS2_JUMP_SLOT: