summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--hmac.c2
-rw-r--r--nettle-internal.h2
3 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0416b59c..e7dbb612 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2022-08-05 Niels Möller <nisse@lysator.liu.se>
+ * nettle-internal.h: Include stdlib.h, fix alloca warnings on BSD.
+ * hmac.c: Delete corresponding include here, no longer needed.
+
* getopt.c: Include stdlib.h and unistd.h unconditionally,
similarly to the gnulib version of this file.
diff --git a/hmac.c b/hmac.c
index 6ac5e11a..ea356970 100644
--- a/hmac.c
+++ b/hmac.c
@@ -36,8 +36,6 @@
#endif
#include <assert.h>
-/* Needed for alloca on freebsd */
-#include <stdlib.h>
#include <string.h>
#include "hmac.h"
diff --git a/nettle-internal.h b/nettle-internal.h
index ddc483de..92416400 100644
--- a/nettle-internal.h
+++ b/nettle-internal.h
@@ -36,6 +36,8 @@
#define NETTLE_INTERNAL_H_INCLUDED
#include <assert.h>
+/* Needed for alloca on bsd systems. */
+#include <stdlib.h>
#include "nettle-meta.h"