From aa56331b81e9f1199e29af0fbb6df041659b58ba Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 9 May 2024 15:09:17 -0400 Subject: [PATCH] ust-fd: Add close_range declaration Old libc headers do not contain a declaration of close_range(). Emit our own declaration to prevent compiler warnings. Signed-off-by: Mathieu Desnoyers Change-Id: If6ca8193895efbb6ce1ba46e092939b8099bcff6 --- src/lib/lttng-ust-fd/lttng-ust-fd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/lttng-ust-fd/lttng-ust-fd.c b/src/lib/lttng-ust-fd/lttng-ust-fd.c index 0360b6f2..01decd1e 100644 --- a/src/lib/lttng-ust-fd/lttng-ust-fd.c +++ b/src/lib/lttng-ust-fd/lttng-ust-fd.c @@ -148,6 +148,9 @@ int fclose(FILE *stream) __lttng_ust_fd_plibc_fclose); } +/* Old libc headers don't contain a close_range() declaration. */ +int close_range(unsigned int first, unsigned int last, int flags); + /* * Override the libc close_range() symbol with our own, allowing * applications to close arbitrary file descriptors. If the fd is owned -- 2.34.1