[PATCH] Include <alloca.h> conditionally
Kamil Rytarowski
n54@gmx.com
Tue Mar 17 14:03:12 GMT 2020
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
More information about the Gdb-patches
mailing list