]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
lib/nettle/int/nettle-internal.h: include alloca.h if configure found it
authorAlan Coopersmith <alan.coopersmith@oracle.com>
Tue, 8 Oct 2024 16:51:00 +0000 (09:51 -0700)
committerAlan Coopersmith <alan.coopersmith@oracle.com>
Tue, 8 Oct 2024 16:51:00 +0000 (09:51 -0700)
Needed for alloca definition on Solaris, to avoid build error with gcc 14:

lib/nettle/int/nettle-internal.h:59:39: error: implicit declaration of
 function 'alloca' [-Wimplicit-function-declaration]
   59 | #define TMP_ALLOC(name, size) (name = alloca(sizeof(*name) * (size)))
      |                                       ^~~~~~

Closes #782

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
lib/nettle/int/nettle-internal.h

index b0eaaad9051745a01c2742e241eb397a364d6d3f..5cf16961ebb9ee7552fed71cac93fc4c563f2ca6 100644 (file)
@@ -36,6 +36,9 @@
 #define GNUTLS_NETTLE_INT_NETTLE_INTERNAL_H_INCLUDED
 
 #include <assert.h>
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
 /* Needed for alloca on bsd systems. */
 #include <stdlib.h>