]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Include <alloca.h> conditionally
authorKamil Rytarowski <n54@gmx.com>
Tue, 17 Mar 2020 14:01:55 +0000 (15:01 +0100)
committerKamil Rytarowski <n54@gmx.com>
Wed, 18 Mar 2020 01:29:21 +0000 (02:29 +0100)
Fixes build on NetBSD, where alloca() is defined in <stdlib.h>.

gdbsupport:

* common-defs.h: Include alloca.h if HAVE_ALLOCA_H is defined.

gdbsupport/ChangeLog
gdbsupport/common-defs.h

index c471726af5eb4391508037a2c63113da822f54c3..f62e440af7f56af5583d63890adcabb2eae056f9 100644 (file)
@@ -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.
index 65500ce76343ec8cc677526e50588bd78801dfa7..e42d2b80c045361cfa19f52cb146ae32c58f61b3 100644 (file)
@@ -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