bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ssfmalloc: Fix includes


From: Bruno Haible
Subject: ssfmalloc: Fix includes
Date: Mon, 04 Jan 2021 07:59:45 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; )

The #include statements were not exactly right here:


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().

diff --git a/lib/ssfmalloc.h b/lib/ssfmalloc.h
index d5e0a1e..8fdb2b1 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 640071d..6571ced 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"
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]