public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Kamil Rytarowski <n54@gmx.com>
To: gdb-patches@sourceware.org
Subject: [PATCH] Include <alloca.h> conditionally
Date: Tue, 17 Mar 2020 15:03:12 +0100	[thread overview]
Message-ID: <20200317140312.1367-1-n54@gmx.com> (raw)

Fixes build on NetBSD, where alloca() is defined in <stdlib.h>.
---
 gdbsupport/common-defs.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gdbsupport/common-defs.h b/gdbsupport/common-defs.h
index 65500ce7634..e42d2b80c04 100644
--- a/gdbsupport/common-defs.h
+++ b/gdbsupport/common-defs.h
@@ -92,7 +92,9 @@
 #include <strings.h>	/* for strcasecmp and strncasecmp */
 #endif
 #include <errno.h>
+#if HAVE_ALLOCA_H
 #include <alloca.h>
+#endif

 #include "ansidecl.h"
 /* This is defined by ansidecl.h, but we prefer gnulib's version.  On
--
2.25.0


             reply	other threads:[~2020-03-17 14:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-17 14:03 Kamil Rytarowski [this message]
2020-03-18  1:20 ` Simon Marchi

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=20200317140312.1367-1-n54@gmx.com \
    --to=n54@gmx.com \
    --cc=gdb-patches@sourceware.org \
    /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).