From: Kamil Rytarowski Date: Tue, 17 Mar 2020 14:01:55 +0000 (+0100) Subject: Include conditionally X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d3e2a5e85df4c8454135503c1034b95fecd522ab;p=binutils-gdb.git Include conditionally Fixes build on NetBSD, where alloca() is defined in . gdbsupport: * common-defs.h: Include alloca.h if HAVE_ALLOCA_H is defined. --- 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 + + * 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 65500ce7634..e42d2b80c04 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