From d3e2a5e85df4c8454135503c1034b95fecd522ab Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Tue, 17 Mar 2020 15:01:55 +0100 Subject: [PATCH] Include conditionally Fixes build on NetBSD, where alloca() is defined in . gdbsupport: * common-defs.h: Include alloca.h if HAVE_ALLOCA_H is defined. --- gdbsupport/ChangeLog | 4 ++++ gdbsupport/common-defs.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/gdbsupport/ChangeLog b/gdbsupport/ChangeLog index c471726af5..f62e440af7 100644 --- a/gdbsupport/ChangeLog +++ b/gdbsupport/ChangeLog @@ -1,3 +1,7 @@ +2020-03-17 Kamil Rytarowski + + * common-defs.h: Include alloca.h if HAVE_ALLOCA_H is defined. + 2020-03-12 Tom Tromey * common-types.h: Remove GDBSERVER code. diff --git a/gdbsupport/common-defs.h b/gdbsupport/common-defs.h index 65500ce763..e42d2b80c0 100644 --- a/gdbsupport/common-defs.h +++ b/gdbsupport/common-defs.h @@ -92,7 +92,9 @@ #include /* for strcasecmp and strncasecmp */ #endif #include +#if HAVE_ALLOCA_H #include +#endif #include "ansidecl.h" /* This is defined by ansidecl.h, but we prefer gnulib's version. On -- 2.34.1