From e5a216ba89deba84356bad9d4c2eab99071c745b Mon Sep 17 00:00:00 2001 From: Gwynne Raskind Date: Thu, 13 Jun 2024 13:24:28 -0500 Subject: [PATCH] Silence warning about missing include in macOS builds (#2741) --- Sources/CNIOLinux/include/CNIOLinux.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Sources/CNIOLinux/include/CNIOLinux.h b/Sources/CNIOLinux/include/CNIOLinux.h index cde2942fde..dd4bf976c8 100644 --- a/Sources/CNIOLinux/include/CNIOLinux.h +++ b/Sources/CNIOLinux/include/CNIOLinux.h @@ -31,12 +31,19 @@ #include #include #include -#include "liburing_nio.h" #include #include #include #include #include +#endif + +// We need to include this outside the `#ifdef` so macOS builds don't warn about the missing include, +// but we also need to make sure the system includes come before it on Linux, so we put it down here +// between an `#endif/#ifdef` pair rather than at the top. +#include "liburing_nio.h" + +#ifdef __linux__ #if __has_include() #include