From 74d1df6682e9dab799e6da8ad032f61b15be57d2 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Fri, 3 Oct 2014 00:22:36 -0300 Subject: [PATCH] Move array implementation to shared directory --- Makefile.am | 6 +++--- libkmod/docs/Makefile.am | 1 - libkmod/libkmod-array.c => shared/array.c | 3 ++- libkmod/libkmod-array.h => shared/array.h | 2 ++ tools/depmod.c | 2 +- tools/modprobe.c | 3 ++- 6 files changed, 10 insertions(+), 7 deletions(-) rename libkmod/libkmod-array.c => shared/array.c (99%) rename libkmod/libkmod-array.h => shared/array.h (96%) diff --git a/Makefile.am b/Makefile.am index 7e063ff..7f65e31 100644 --- a/Makefile.am +++ b/Makefile.am @@ -45,13 +45,13 @@ LIBKMOD_AGE=2 noinst_LTLIBRARIES = libkmod/libkmod-util.la libkmod_libkmod_util_la_SOURCES = \ shared/macro.h \ - shared/missing.h\ + shared/missing.h \ + shared/array.c \ + shared/array.h \ shared/util.c \ shared/util.h \ libkmod/libkmod-hash.c \ libkmod/libkmod-hash.h \ - libkmod/libkmod-array.c \ - libkmod/libkmod-array.h \ libkmod/libkmod-util.c \ libkmod/libkmod-util.h diff --git a/libkmod/docs/Makefile.am b/libkmod/docs/Makefile.am index 673c93b..1fd6b90 100644 --- a/libkmod/docs/Makefile.am +++ b/libkmod/docs/Makefile.am @@ -22,7 +22,6 @@ CFILE_GLOB = $(top_srcdir)/libkmod/libkmod.c $(top_srcdir)/libkmod/libkmod-modul IGNORE_HFILES = libkmod-internal.h \ libkmod-util.h \ - libkmod-array.h \ libkmod-hash.h \ libkmod-index.h diff --git a/libkmod/libkmod-array.c b/shared/array.c similarity index 99% rename from libkmod/libkmod-array.c rename to shared/array.c index 1082deb..b37e54e 100644 --- a/libkmod/libkmod-array.c +++ b/shared/array.c @@ -18,8 +18,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include + #include "libkmod.h" -#include "libkmod-array.h" #include #include diff --git a/libkmod/libkmod-array.h b/shared/array.h similarity index 96% rename from libkmod/libkmod-array.h rename to shared/array.h index dd2ba55..b88482f 100644 --- a/libkmod/libkmod-array.h +++ b/shared/array.h @@ -1,5 +1,7 @@ #pragma once +#include + /* * Declaration of struct array is in header because we may want to embed the * structure into another, so we need to know its size diff --git a/tools/depmod.c b/tools/depmod.c index 274d020..e1e08f6 100644 --- a/tools/depmod.c +++ b/tools/depmod.c @@ -17,10 +17,10 @@ * along with this program. If not, see . */ #include "libkmod.h" -#include "libkmod-array.h" #include "libkmod-hash.h" #include "libkmod-util.h" +#include #include #include diff --git a/tools/modprobe.c b/tools/modprobe.c index eb3a36b..5799271 100644 --- a/tools/modprobe.c +++ b/tools/modprobe.c @@ -32,7 +32,8 @@ #include #include "libkmod.h" -#include "libkmod-array.h" + +#include #include #include "kmod.h"