X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=liblttng-ust-dl%2Flttng-ust-dl.c;h=7d78f1d06ef0e77cca51e3dcdbde3f06659c9e72;hb=31624f6cf986d7e7761847f66562c97bc773a02c;hp=231e9ec38ae86481f74cb4aa2d8dcbf0a47a8b2e;hpb=09026ccf412bb6ec3367d0e614efffca564f1578;p=lttng-ust.git diff --git a/liblttng-ust-dl/lttng-ust-dl.c b/liblttng-ust-dl/lttng-ust-dl.c index 231e9ec3..7d78f1d0 100644 --- a/liblttng-ust-dl/lttng-ust-dl.c +++ b/liblttng-ust-dl/lttng-ust-dl.c @@ -1,36 +1,26 @@ /* - * Copyright (C) 2013 Paul Woegerer - * Copyright (C) 2015 Antoine Busque - * Copyright (C) 2016 Mathieu Desnoyers + * SPDX-License-Identifier: LGPL-2.1-only * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; version 2.1 of - * the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Copyright (C) 2013 Paul Woegerer + * Copyright (C) 2015 Antoine Busque + * Copyright (C) 2016 Mathieu Desnoyers */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include +#include #include #include -#include +#include #include #include -#include +#include #include "usterr-signal-safe.h" +#include "../liblttng-ust/ust-events-internal.h" + /* Include link.h last else it conflicts with ust-dlfcn. */ #include @@ -44,6 +34,12 @@ static void *(*__lttng_ust_plibc_dlmopen)(Lmid_t nsid, const char *filename, #endif static int (*__lttng_ust_plibc_dlclose)(void *handle); +static __attribute__((constructor)) +void _lttng_ust_dl_init(void) +{ + ust_err_init(); +} + static void *_lttng_ust_dl_libc_dlopen(const char *filename, int flags) {