From patchwork Sun Jan 28 18:08:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 866884 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-89740-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="dRNytR56"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zV0yF5w3fz9t2x for ; Mon, 29 Jan 2018 05:08:53 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; q=dns; s= default; b=m/pDDMvGzOEy7x0fwImiGOiDZBQXx5N4TF1+xCQP6jP0p9AYz/dQc yK0qBApKDVNxngeJUOuDrc+0ty2hgryHYeUnGiqCw4f5seFxOHS8B6j/31pPrNDM T0WJWSgkH6VYsvRQ8Pvk2SW97Og42c1uvudEd24stFqPYlgkccQyEQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; s=default; bh=+L1ii9ufjqqo9gujPlcUDck7BoE=; b=dRNytR561ugCO1rqExvzWk0LhArI 37TeZ7R/g6B+IJleyxMmQeph5i2+DPfQTq8l1+8+SK34/e1/E0iBonC+Vc7u19bL Eued+sJzj4qB9o/+auSRhmZvbBw5k9qf3EGD8C7j6SeFF4n/Vcb8dJ/2ndLV6+I8 ujgimLiWQWECQrc= Received: (qmail 75125 invoked by alias); 28 Jan 2018 18:08:48 -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 75110 invoked by uid 89); 28 Jan 2018 18:08:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, SPF_NEUTRAL autolearn=ham version=3.3.2 spammy=1mb, Hx-languages-length:1794 X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault Subject: [hurd,commited] hurd: Fix getifaddrs / freeifaddrs exposition Date: Sun, 28 Jan 2018 19:08:43 +0100 Message-Id: <20180128180843.31804-1-samuel.thibault@ens-lyon.org> 400669754de4 ('hurd: Fix nscd build') had the side effect of making libc's freeaddrinfo expose freeifaddrs through __check_pf. We can just move the renames to gai.c itself, along others. * sysdeps/mach/hurd/check_pf.c (__getifaddrs, __freeifaddrs): Do not define macros. * nscd/gai.c (__getifaddrs): Define macro to getifaddrs. (__freeifaddrs): Define macro to freeifaddrs. --- ChangeLog | 2 ++ nscd/gai.c | 2 ++ sysdeps/mach/hurd/check_pf.c | 2 -- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ae834cf77d..99e668929e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -51,6 +51,8 @@ * hurd/path-lookup.c (hurd_file_name_path_lookup): Likewise. * sysdeps/mach/hurd/check_native.c: New file. * sysdeps/mach/hurd/check_pf.c: New file. + * nscd/gai.c (__getifaddrs): Define macro to getifaddrs. + (__freeifaddrs): Define macro to freeifaddrs. * sysdeps/mach/hurd/libhurduser.abilist: New file. * sysdeps/mach/libmachuser.abilist: New file. * libio/tst-memstream3.c (FWRITE): Rename to _FWRITE. diff --git a/nscd/gai.c b/nscd/gai.c index d00a184c46..d081747797 100644 --- a/nscd/gai.c +++ b/nscd/gai.c @@ -31,6 +31,8 @@ #define __qsort_r qsort_r /* nscd uses 1MB or 2MB thread stacks. */ #define __libc_use_alloca(size) (size <= __MAX_ALLOCA_CUTOFF) +#define __getifaddrs getifaddrs +#define __freeifaddrs freeifaddrs /* We are nscd, so we don't want to be talking to ourselves. */ #undef USE_NSCD diff --git a/sysdeps/mach/hurd/check_pf.c b/sysdeps/mach/hurd/check_pf.c index 32cc28340b..edd99a7278 100644 --- a/sysdeps/mach/hurd/check_pf.c +++ b/sysdeps/mach/hurd/check_pf.c @@ -1,3 +1 @@ -#define __getifaddrs getifaddrs -#define __freeifaddrs freeifaddrs #include