From 41a448da815eda28c63e3e8132f7f40e0aea8afc Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 3 May 2024 10:14:29 -0600 Subject: [PATCH] examples: Include sys/stat.h for S_I* constants POSIX says that these constants are defined in sys/stat.h. On Linux with glibc and musl this is also defined in fcntl.h. Other systems define it only in sys/stat.h, so include that as well. The Linux headers ensure that the first of sys/stat.h or fcntl.h define the constant, so it's harmless to include both. For the latest standard, IEEE Std 1003.1-2017, see https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/fcntl.h.html and https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_stat.h.html for details. Signed-off-by: Warner Losh --- examples/telemetry-listen.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/telemetry-listen.c b/examples/telemetry-listen.c index ec5edb38..9aae8b07 100644 --- a/examples/telemetry-listen.c +++ b/examples/telemetry-listen.c @@ -19,6 +19,7 @@ #include #include #include +#include #include