From patchwork Wed Dec 18 22:52:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Terekhov, Mikhail via Gdb-patches" X-Patchwork-Id: 36951 Received: (qmail 50426 invoked by alias); 18 Dec 2019 22:52:23 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 50418 invoked by uid 89); 18 Dec 2019 22:52:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=enable-targets, enabletargets X-HELO: mail-qv1-f74.google.com Received: from mail-qv1-f74.google.com (HELO mail-qv1-f74.google.com) (209.85.219.74) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Dec 2019 22:52:22 +0000 Received: by mail-qv1-f74.google.com with SMTP id z9so2408352qvo.10 for ; Wed, 18 Dec 2019 14:52:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=ikSvAKP4dYug9XEp85zMfLYMM2s74WaFR9ty63PWgHg=; b=OQ9768Q0G/Ss0pj3igOkdejwlw9jwqIRlhOZE1c3KVONHbpPv6GpbIJtpnpfacOqey ZYjOrJ5SdRLj4mdX/lLpI9H0lvms9blGJtWwbkBoUpGpV/gVknhP+GOpk8TnLJQ1Ii3n E/rC0KG9OowxkJuxyVe5nkXrMOP8/sljlTdcQMf38GWZR+dJl++kNuF365WiCFMGAYB9 ZYcXj5nc2UKg7HQH3mRPwssbSnvo/qp2qJRck7NFwhmpAlfavjvNTwF0OMffdzREm1by xh4S6jDCishT6FITvKh2xMnyOLQjYT5jokZ8sX9K1KqClyfwSyGUPG2IaEQTU1JygIJC P/bA== Date: Wed, 18 Dec 2019 16:52:16 -0600 Message-Id: <20191218225216.7073-1-cbiesinger@google.com> Mime-Version: 1.0 Subject: [PATCH] Rename "sun" variable to avoid conflicts on Solaris X-Patchwork-Original-From: "Christian Biesinger via gdb-patches" From: "Terekhov, Mikhail via Gdb-patches" Reply-To: Christian Biesinger To: gdb-patches@sourceware.org Cc: Christian Biesinger X-IsSubscribed: yes A Solaris system header has a #define for "sun". This renames that variable to avoid the conflict, fixing a build error with --enable-targets=all on Solaris. gdb/ChangeLog: 2019-12-18 Christian Biesinger * fbsd-tdep.c (fbsd_info_proc_files_entry): Rename local var "sun" to "saddr_un". Change-Id: I07a5cd801db1e28ccab8a473ebad74d7afe017c2 --- gdb/fbsd-tdep.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c index 937f696f44..d7482d3b58 100644 --- a/gdb/fbsd-tdep.c +++ b/gdb/fbsd-tdep.c @@ -1018,12 +1018,12 @@ fbsd_info_proc_files_entry (int kf_type, int kf_fd, int kf_flags, /* For local sockets, print out the first non-nul path rather than both paths. */ - const struct fbsd_sockaddr_un *sun + const struct fbsd_sockaddr_un *saddr_un = reinterpret_cast (kf_sa_local); - if (sun->sun_path[0] == 0) - sun = reinterpret_cast + if (saddr_un->sun_path[0] == 0) + saddr_un = reinterpret_cast (kf_sa_peer); - printf_filtered ("%s", sun->sun_path); + printf_filtered ("%s", saddr_un->sun_path); break; } case FBSD_AF_INET: