[lttng-dev] [PATCH lttng-tools 08/24] Fix : Don't compile ust functions when not enabled

Charles Briere c.briere at samsung.com
Mon Oct 27 16:49:28 EDT 2014


From: Charles Briere <c.briere at samsung.com>

Signed-off-by: Charles Briere <c.briere at samsung.com>
---
 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 <fcntl.h>
 #include <limits.h>
@@ -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



More information about the lttng-dev mailing list