From ec1778a37f34ae15ddc3dddf4fd452de195672be Mon Sep 17 00:00:00 2001 From: Christopher Fore Date: Thu, 14 Dec 2023 23:17:11 -0500 Subject: [PATCH] backends: Include unistd.h to fix compilation on musl Musl doesn't seem to include this by default so explicitly including it should fix compilation on Musl. Tested with Clang 16/17 and GCC 14. Error: src/backends/meta-fd-source.c:70:3: error: call to undeclared function 'close'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] close (fd_source->poll_fd.fd); ^ Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3078 Part-of: --- src/backends/meta-fd-source.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backends/meta-fd-source.c b/src/backends/meta-fd-source.c index d66c7b748..73989bf15 100644 --- a/src/backends/meta-fd-source.c +++ b/src/backends/meta-fd-source.c @@ -20,6 +20,8 @@ #include "config.h" +#include + #include "backends/meta-fd-source.h" typedef struct _MetaFdtSource