+static
+int _lttng_ust_fd_libc_fclose(FILE *stream)
+{
+ if (!__lttng_ust_fd_plibc_fclose) {
+ __lttng_ust_fd_plibc_fclose = dlsym(RTLD_NEXT, "fclose");
+ if (!__lttng_ust_fd_plibc_fclose) {
+ fprintf(stderr, "%s\n", dlerror());
+ return -1;
+ }
+ }
+ return lttng_ust_safe_fclose_stream(stream,
+ __lttng_ust_fd_plibc_fclose);
+}
+