From patchwork Thu Nov 30 22:54:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lu, Hongjiu" X-Patchwork-Id: 24647 Received: (qmail 36731 invoked by alias); 30 Nov 2017 22:55:00 -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 36719 invoked by uid 89); 30 Nov 2017 22:55:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, 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= X-HELO: mga04.intel.com X-ExtLoop1: 1 Date: Thu, 30 Nov 2017 14:54:56 -0800 From: "H.J. Lu" To: GNU C Library Subject: [PATCH] mips: Don't use MIN in dl-machine.h Message-ID: <20171130225456.GA51351@intel.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. Tested with build-many-glibcs.py. OK for master? H.J. --- * sysdeps/mips/dl-machine.h (elf_machine_reloc): Expand MIN. --- sysdeps/mips/dl-machine.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index da9d6332ea..904824b908 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -695,7 +695,8 @@ elf_machine_reloc (struct link_map *map, ElfW(Addr) r_info, RTLD_PROGNAME, strtab + refsym->st_name); } memcpy (reloc_addr, (void *) value, - MIN (sym->st_size, refsym->st_size)); + sym->st_size < refsym->st_size + ? sym->st_size : refsym->st_size); break; }