Add abi0 conflict tests
[lttng-ust.git] / tests / regression / abi0-conflict / fake-ust.c
CommitLineData
d2a010d1
MJ
1/*
2 * SPDX-License-Identifier: LGPL-2.1-only
3 *
4 * Copyright (C) 2021 Michael Jeanson <mjeanson@efficios.com>
5 */
6
7#include <stdio.h>
8#include <stdint.h>
9
10#include "./fake-ust.h"
11
12void init_usterr(void)
13{
14 fprintf(stderr, "libfakeust0: init_usterr() called.\n");
15}
16
17/*
18 * The symbol used by liblttng-ust.so.1 to detect liblttng-ust.so.0 in a
19 * process.
20 */
21int ltt_probe_register(struct lttng_probe_desc *desc __attribute__((unused)))
22{
23 fprintf(stderr, "libfakeust0: ltt_probe_register() called.\n");
24 return 0;
25}
26
27/*
28 * This constructor calls the 'init_usterr' canary function which is provided
29 * by liblttng-ust.so.1.
30 */
31static
32void fake_ust_ctor(void)
33 __attribute__((constructor));
34static void fake_ust_ctor(void)
35{
36 init_usterr();
37}
This page took 0.023704 seconds and 4 git commands to generate.