public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Cc: Christian Biesinger <cbiesinger@google.com>
Subject: [PATCH] Rename "sun" variable to avoid conflicts on Solaris
Date: Thu, 19 Dec 2019 00:01:00 -0000	[thread overview]
Message-ID: <20191219000103.36667-2-cbiesinger@google.com> (raw)
In-Reply-To: <20191219000103.36667-1-cbiesinger@google.com>

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  <cbiesinger@google.com>

	* 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<const struct fbsd_sockaddr_un *> (kf_sa_local);
-	    if (sun->sun_path[0] == 0)
-	      sun = reinterpret_cast<const struct fbsd_sockaddr_un *>
+	    if (saddr_un->sun_path[0] == 0)
+	      saddr_un = reinterpret_cast<const struct fbsd_sockaddr_un *>
 		(kf_sa_peer);
-	    printf_filtered ("%s", sun->sun_path);
+	    printf_filtered ("%s", saddr_un->sun_path);
 	    break;
 	  }
 	case FBSD_AF_INET:
-- 
2.24.1.735.g03f4e72817-goog

  parent reply	other threads:[~2019-12-19  0:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-19  0:01 [PATCH 0/3] Fix Solaris build with enable-targets=all Christian Biesinger via gdb-patches
2019-12-19  0:01 ` [PATCH 3/3] Make the literal argument to pow a double, not an integer Christian Biesinger via gdb-patches
2019-12-19 18:19   ` Tom Tromey
2019-12-19 19:13     ` Christian Biesinger via gdb-patches
2019-12-19  0:01 ` Christian Biesinger via gdb-patches [this message]
2019-12-19  0:01 ` [PATCH 2/3] Cast the log10 argument to double to disambiguate it Christian Biesinger via gdb-patches
2019-12-19  3:35   ` Eli Zaretskii
2019-12-19 18:17     ` Tom Tromey
2019-12-19 19:11       ` Christian Biesinger via gdb-patches
2019-12-19  0:01 ` [PATCH 1/3] Undef REG_Y in s12z.h, it may be defined in a system header Christian Biesinger via gdb-patches
2019-12-19 18:18   ` Tom Tromey
2019-12-19 19:14 ` [PATCH 0/3] Fix Solaris build with enable-targets=all Christian Biesinger via gdb-patches
  -- strict thread matches above, loose matches on Subject: below --
2019-12-18 22:52 [PATCH] Rename "sun" variable to avoid conflicts on Solaris Christian Biesinger via gdb-patches
2019-12-19 18:16 ` Tom Tromey
2019-12-19 19:03   ` Christian Biesinger via gdb-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191219000103.36667-2-cbiesinger@google.com \
    --to=gdb-patches@sourceware.org \
    --cc=cbiesinger@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).