From 0ba98ebc83bf874d34c8c84b164a6ad803e9de75 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Fri, 20 Jan 2012 15:51:04 -0500 Subject: [PATCH] Move compat to common and create an internal lib libcompat is the name of the new lib. Signed-off-by: David Goulet --- src/bin/lttng-sessiond/Makefile.am | 10 ++-------- src/bin/lttng-sessiond/main.c | 2 +- src/common/Makefile.am | 10 ++++++++++ .../lttng-sessiond => common}/compat/compat-epoll.c | 0 .../lttng-sessiond => common}/compat/compat-poll.c | 0 src/{bin/lttng-sessiond => common}/compat/poll.h | 0 6 files changed, 13 insertions(+), 9 deletions(-) rename src/{bin/lttng-sessiond => common}/compat/compat-epoll.c (100%) rename src/{bin/lttng-sessiond => common}/compat/compat-poll.c (100%) rename src/{bin/lttng-sessiond => common}/compat/poll.h (100%) diff --git a/src/bin/lttng-sessiond/Makefile.am b/src/bin/lttng-sessiond/Makefile.am index e39207426..c431ade86 100644 --- a/src/bin/lttng-sessiond/Makefile.am +++ b/src/bin/lttng-sessiond/Makefile.am @@ -5,14 +5,7 @@ AM_CFLAGS = -fno-strict-aliasing bin_PROGRAMS = lttng-sessiond -if COMPAT_EPOLL -COMPAT=compat/compat-epoll.c -else -COMPAT=compat/compat-poll.c -endif - lttng_sessiond_SOURCES = utils.c utils.h \ - compat/poll.h $(COMPAT) \ trace-kernel.c trace-kernel.h \ kernel.c kernel.h \ ust-ctl.h ust-app.h trace-ust.h \ @@ -37,7 +30,8 @@ lttng_sessiond_LDADD = -lrt -lurcu-common -lurcu \ $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \ $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \ $(top_builddir)/src/common/hashtable/libhashtable.la \ - $(top_builddir)/src/common/libcommon.la + $(top_builddir)/src/common/libcommon.la \ + $(top_builddir)/src/common/libcompat.la if HAVE_LIBLTTNG_UST_CTL lttng_sessiond_LDADD += -llttng-ust-ctl diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 0d1a916c2..82deb9b0e 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -43,10 +43,10 @@ #include #include #include +#include #include "lttng-sessiond.h" #include "channel.h" -#include "compat/poll.h" #include "context.h" #include "event.h" #include "futex.h" diff --git a/src/common/Makefile.am b/src/common/Makefile.am index a8125bc40..6b11d5084 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -24,3 +24,13 @@ if HAVE_LIBLTTNG_UST_CTL libconsumer_la_LIBADD += \ $(top_builddir)/src/common/ust-consumer/libust-consumer.la endif + +if COMPAT_EPOLL +COMPAT=compat/compat-epoll.c +else +COMPAT=compat/compat-poll.c +endif + +noinst_LTLIBRARIES += libcompat.la + +libcompat_la_SOURCES = compat/poll.h $(COMPAT) diff --git a/src/bin/lttng-sessiond/compat/compat-epoll.c b/src/common/compat/compat-epoll.c similarity index 100% rename from src/bin/lttng-sessiond/compat/compat-epoll.c rename to src/common/compat/compat-epoll.c diff --git a/src/bin/lttng-sessiond/compat/compat-poll.c b/src/common/compat/compat-poll.c similarity index 100% rename from src/bin/lttng-sessiond/compat/compat-poll.c rename to src/common/compat/compat-poll.c diff --git a/src/bin/lttng-sessiond/compat/poll.h b/src/common/compat/poll.h similarity index 100% rename from src/bin/lttng-sessiond/compat/poll.h rename to src/common/compat/poll.h -- 2.34.1