[Top][All Lists]

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

bitsetv: fix module dependencies

From: Bruno Haible
Subject: bitsetv: fix module dependencies
Date: Fri, 04 Jan 2019 12:57:37 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-141-generic; KDE/5.18.0; x86_64; ; )

A module shouldn't rely on internals of another module.
bitsetv.c invokes xalloc_die(), therefore it should #include "xalloc.h",
regardless whether bitset.h already - indirectly through bitset/base.h -
includes xalloc.h.

2019-01-04  Bruno Haible  <address@hidden>

        bitsetv: Fix module dependencies.
        * lib/bitsetv.c: Include xalloc.h.
        * modules/bitsetv (Depends-on): Add 'xalloc'.

diff --git a/lib/bitsetv.c b/lib/bitsetv.c
index b509982..e3cc584 100644
--- a/lib/bitsetv.c
+++ b/lib/bitsetv.c
@@ -22,6 +22,8 @@
 #include <stdlib.h>
+#include "xalloc.h"
 /* Create a vector of N_VECS bitsets, each of N_BITS, and of
    type TYPE.  */
diff --git a/modules/bitsetv b/modules/bitsetv
index 30be286..4b6c1a8 100644
--- a/modules/bitsetv
+++ b/modules/bitsetv
@@ -7,6 +7,7 @@ lib/bitsetv.h
 lib_SOURCES += bitsetv.c

reply via email to

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