X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust-dl%2Flttng-ust-dl.c;h=1394ce1963fce5e31ec53dc41e1b39ebf21237c3;hb=6ba6fd60507f8e045bdc4f1be14e9d99c6a15f7f;hp=5509597e0b293a46bbb7623d7b61235d09d74ee7;hpb=fb54defd7e47e106bdf3b7eb07d53f0aba0525ec;p=lttng-ust.git diff --git a/liblttng-ust-dl/lttng-ust-dl.c b/liblttng-ust-dl/lttng-ust-dl.c index 5509597e..1394ce19 100644 --- a/liblttng-ust-dl/lttng-ust-dl.c +++ b/liblttng-ust-dl/lttng-ust-dl.c @@ -1,21 +1,9 @@ /* - * 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 _LGPL_SOURCE @@ -25,12 +13,14 @@ #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,15 @@ static void *(*__lttng_ust_plibc_dlmopen)(Lmid_t nsid, const char *filename, #endif static int (*__lttng_ust_plibc_dlclose)(void *handle); +static +void _lttng_ust_dl_init(void) + __attribute__((constructor)); +static +void _lttng_ust_dl_init(void) +{ + ust_err_init(); +} + static void *_lttng_ust_dl_libc_dlopen(const char *filename, int flags) {