X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust-fd%2Flttng-ust-fd.c;h=c60f3f0370bcf51b7d54edca395cf8493e052f47;hb=864a1eda22ed99266509ac76451c6f27f91aa17e;hp=863f0618adefd605ede54dbf1b2cb4981c7338f4;hpb=52a20dc78a372394471e3394a8d335ef00cebad3;p=lttng-ust.git diff --git a/liblttng-ust-fd/lttng-ust-fd.c b/liblttng-ust-fd/lttng-ust-fd.c index 863f0618..c60f3f03 100644 --- a/liblttng-ust-fd/lttng-ust-fd.c +++ b/liblttng-ust-fd/lttng-ust-fd.c @@ -1,22 +1,9 @@ /* - * Copyright (C) 2016 Mathieu Desnoyers - * - * 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. + * SPDX-License-Identifier: LGPL-2.1-only * - * 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) 2016 Mathieu Desnoyers */ -#define _GNU_SOURCE #define _LGPL_SOURCE #include #include @@ -25,11 +12,9 @@ #include #include -#include +#include #include "usterr-signal-safe.h" -volatile enum ust_loglevel ust_loglevel; - static int (*__lttng_ust_fd_plibc_close)(int fd); static int (*__lttng_ust_fd_plibc_fclose)(FILE *stream); @@ -79,13 +64,13 @@ int fclose(FILE *stream) /* Solaris and FreeBSD. */ void closefrom(int lowfd) { - (void) lttng_ust_safe_closefrom(lowfd, __lttng_ust_fd_plibc_close); + (void) lttng_ust_safe_closefrom_fd(lowfd, __lttng_ust_fd_plibc_close); } #elif defined(__NetBSD__) || defined(__OpenBSD__) /* NetBSD and OpenBSD. */ int closefrom(int lowfd) { - return lttng_ust_safe_closefrom(lowfd, __lttng_ust_fd_plibc_close); + return lttng_ust_safe_closefrom_fd(lowfd, __lttng_ust_fd_plibc_close); } #else /* As far as we know, this OS does not implement closefrom. */