summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--lib/ssfmalloc.h3
-rw-r--r--tests/test-ssfmalloc.c1
3 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c2e48a7b4f..6f42f1ccc5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-01-04 Bruno Haible <bruno@clisp.org>
+
+ ssfmalloc: Fix includes.
+ * lib/ssfmalloc.h: Include <strings.h>, for ffs().
+ * tests/test-ssfmalloc.c: Include <string.h>, for memset().
+
2021-01-03 Bruno Haible <bruno@clisp.org>
quotearg tests: Avoid test failures on Solaris 11.3.
diff --git a/lib/ssfmalloc.h b/lib/ssfmalloc.h
index d5e0a1eb9f..8fdb2b14a6 100644
--- a/lib/ssfmalloc.h
+++ b/lib/ssfmalloc.h
@@ -121,7 +121,8 @@ static void free_block (uintptr_t block);
*/
#include <stdlib.h>
-#include <string.h>
+#include <string.h> /* ffsll */
+#include <strings.h> /* ffs */
#include "flexmember.h"
#include "glthread/lock.h"
#include "thread-optim.h"
diff --git a/tests/test-ssfmalloc.c b/tests/test-ssfmalloc.c
index 640071de5e..6571cedd96 100644
--- a/tests/test-ssfmalloc.c
+++ b/tests/test-ssfmalloc.c
@@ -142,6 +142,7 @@ free_pages (uintptr_t pages, size_t size)
/* ================================= Tests ================================= */
#include <limits.h>
+#include <string.h>
#include "macros.h"