From mboxrd@z Thu Jan 1 00:00:00 1970 From: c.briere@samsung.com (Charles Briere) Date: Mon, 27 Oct 2014 20:49:28 +0000 Subject: [lttng-dev] [PATCH lttng-tools 08/24] Fix : Don't compile ust functions when not enabled In-Reply-To: <1414442926-14381-1-git-send-email-c.briere@samsung.com> References: <1414442926-14381-1-git-send-email-c.briere@samsung.com> Message-ID: <1414442926-14381-9-git-send-email-c.briere@samsung.com> From: Charles Briere Signed-off-by: Charles Briere --- src/bin/lttng-sessiond/shm.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/bin/lttng-sessiond/shm.c b/src/bin/lttng-sessiond/shm.c index a5caa8b..fa3867c 100644 --- a/src/bin/lttng-sessiond/shm.c +++ b/src/bin/lttng-sessiond/shm.c @@ -16,6 +16,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#if HAVE_LIBLTTNG_UST_CTL + #define _GNU_SOURCE #include #include @@ -170,3 +172,16 @@ char *shm_ust_get_mmap(char *shm_path, int global) error: return NULL; } + +#else + +/* + * Dummy implementation so we do not need to put + * ifdef in main.c + */ +char *shm_ust_get_mmap(char *shm_path, int global) +{ + return 0; +} + +#endif /* HAVE_LIBLTTNG_UST_CTL */ -- 2.1.2