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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3455>
This commit is contained in:
Christopher Fore 2023-12-14 23:17:11 -05:00 committed by Marge Bot
parent 49f76f1295
commit ec1778a37f

View File

@ -20,6 +20,8 @@
#include "config.h"
#include <unistd.h>
#include "backends/meta-fd-source.h"
typedef struct _MetaFdtSource