public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Include <alloca.h> conditionally
@ 2020-03-18  1:30 Kamil Rytarowski
  0 siblings, 0 replies; only message in thread
From: Kamil Rytarowski @ 2020-03-18  1:30 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d3e2a5e85df4c8454135503c1034b95fecd522ab

commit d3e2a5e85df4c8454135503c1034b95fecd522ab
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Tue Mar 17 15:01:55 2020 +0100

    Include <alloca.h> conditionally
    
    Fixes build on NetBSD, where alloca() is defined in <stdlib.h>.
    
    gdbsupport:
    
            * common-defs.h: Include alloca.h if HAVE_ALLOCA_H is defined.

Diff:
---
 gdbsupport/ChangeLog     | 4 ++++
 gdbsupport/common-defs.h | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/gdbsupport/ChangeLog b/gdbsupport/ChangeLog
index c471726af5e..f62e440af7f 100644
--- a/gdbsupport/ChangeLog
+++ b/gdbsupport/ChangeLog
@@ -1,3 +1,7 @@
+2020-03-17  Kamil Rytarowski  <n54@gmx.com>
+
+	* common-defs.h: Include alloca.h if HAVE_ALLOCA_H is defined.
+
 2020-03-12  Tom Tromey  <tom@tromey.com>
 
 	* common-types.h: Remove GDBSERVER code.
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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-03-18  1:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-18  1:30 [binutils-gdb] Include <alloca.h> conditionally Kamil Rytarowski

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).