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:59:04 +0000 (17:59 -0400)
commitc57c2c7421d2bd7611d316ac8ca1cb443e1bc95c
tree6f1cfb7ed49494488fd2f4e776493c882eaa148c
parent990cbf5236222caf3a1fdfa2e2bfeb63dec1e631
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.028177 seconds and 4 git commands to generate.