Fix: sessiond: use system LTTng-UST headers when available
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 18 Oct 2019 20:39:00 +0000 (16:39 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 18 Oct 2019 21:06:59 +0000 (17:06 -0400)
commit75018ab6aaa9b49e6248b002d9795319a0e5bb9a
tree6b867ac60b7623f3f5d0a87755657989dcaa763e
parent4605890e0a926f1c88355051dcd6d8a8dd135c58
Fix: sessiond: use system LTTng-UST headers when available

The LTTng-Tools tree includes a local copy of three LTTng-UST headers:
  * ust-error.h
  * ust-ctl.h
  * ust-abi.h

The system headers should be used when UST support is configured to
ensure the appropriate ABI definitions are used. The local copies of
the headers should only be used when LTTng-Tools is built with the
--without-lttng-ust configuration option. Those headers are needed
since some UST support code is compiled-in even though the support
is deactivated.

A misconfiguration in the CI setup allowed us to notice that
sessiond-config.c is using the internal header unconditionally.

To ensure this doesn't happen in the future, the local copies
are renamed:
  * ust-error.h -> ust-error-internal.h
  * ust-ctl.h   -> ust-ctl-internal.h
  * ust-abi.h   -> ust-abi-internal.h

All code should use the `lttng-` prefixed versions of the headers
which include either the local or "system" copy of the headers
depending on the build configuration.

Reported-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
21 files changed:
src/bin/lttng-sessiond/Makefile.am
src/bin/lttng-sessiond/buffer-registry.c
src/bin/lttng-sessiond/buffer-registry.h
src/bin/lttng-sessiond/channel.c
src/bin/lttng-sessiond/context.h
src/bin/lttng-sessiond/event.c
src/bin/lttng-sessiond/lttng-ust-abi.h
src/bin/lttng-sessiond/lttng-ust-ctl.h
src/bin/lttng-sessiond/lttng-ust-error.h
src/bin/lttng-sessiond/main.c
src/bin/lttng-sessiond/trace-ust.h
src/bin/lttng-sessiond/ust-abi-internal.h [new file with mode: 0644]
src/bin/lttng-sessiond/ust-app.c
src/bin/lttng-sessiond/ust-app.h
src/bin/lttng-sessiond/ust-consumer.c
src/bin/lttng-sessiond/ust-ctl-internal.h [new file with mode: 0644]
src/bin/lttng-sessiond/ust-ctl.h [deleted file]
src/bin/lttng-sessiond/ust-error-internal.h [new file with mode: 0644]
src/bin/lttng-sessiond/ust-field-utils.h
src/bin/lttng-sessiond/ust-registry.h
src/common/consumer/consumer-timer.c
This page took 0.027088 seconds and 4 git commands to generate.