bug-gnulib
[Top][All Lists]
Advanced

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

bitset: Fix conflict with 'free-posix' module


From: Bruno Haible
Subject: bitset: Fix conflict with 'free-posix' module
Date: Sat, 26 Dec 2020 13:50:56 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; )

The continuous integration uncovered this problem: A testdir with modules
'bitset' and 'free-posix' fails to build.

In file included from ../../gllib/bitset.h:31:0,
                 from ../../gllib/bitset.c:22:
../../gllib/bitset.c: In function ‘bitset_free’:
../../gllib/bitset/base.h:200:18: error: ‘const struct bitset_vtable’ has no 
member named ‘rpl_free’
  ((SRC)->b.vtable->free ? (SRC)->b.vtable->free (SRC) :(void)0)
                  ^
../../gllib/bitset.c:173:7: note: in expansion of macro ‘BITSET_FREE_’
       BITSET_FREE_ (bset);
       ^
../../gllib/bitset/base.h:200:42: error: ‘const struct bitset_vtable’ has no 
member named ‘rpl_free’
  ((SRC)->b.vtable->free ? (SRC)->b.vtable->free (SRC) :(void)0)
                                          ^
../../gllib/bitset.c:173:7: note: in expansion of macro ‘BITSET_FREE_’
       BITSET_FREE_ (bset);
       ^
../../gllib/bitset.c: In function ‘bitset_obstack_free’:
../../gllib/bitset/base.h:200:18: error: ‘const struct bitset_vtable’ has no 
member named ‘rpl_free’
  ((SRC)->b.vtable->free ? (SRC)->b.vtable->free (SRC) :(void)0)
                  ^
../../gllib/bitset.c:184:5: note: in expansion of macro ‘BITSET_FREE_’
     BITSET_FREE_ (bset);
     ^
../../gllib/bitset/base.h:200:42: error: ‘const struct bitset_vtable’ has no 
member named ‘rpl_free’
  ((SRC)->b.vtable->free ? (SRC)->b.vtable->free (SRC) :(void)0)
                                          ^
../../gllib/bitset.c:184:5: note: in expansion of macro ‘BITSET_FREE_’
     BITSET_FREE_ (bset);
     ^

This patch fixes it.


2020-12-26  Bruno Haible  <bruno@clisp.org>

        bitset: Fix conflict with 'free-posix' module.
        * lib/bitset/base.h: Include <stdlib.h>.

diff --git a/lib/bitset/base.h b/lib/bitset/base.h
index fe447c2..ad674ef 100644
--- a/lib/bitset/base.h
+++ b/lib/bitset/base.h
@@ -24,6 +24,7 @@
 #include <limits.h>
 #include <stdbool.h>
 #include <stddef.h>
+#include <stdlib.h>     /* because Gnulib's <stdlib.h> may '#define free ...' 
*/
 #include <string.h> /* ffsl */
 
 #include "attribute.h"




reply via email to

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