summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Weigelt, metux IT consult <info@metux.net>2024-03-18 15:25:23 +0100
committerEnrico Weigelt, metux IT consult <info@metux.net>2024-04-17 10:55:10 +0200
commit5057c716eb5960f6971be620ce03a808d0f191ac (patch)
tree58f7ed55f0f44891586249e7f2e4e37a62fcf7ca
parent97e26532d5a4e523220465e4d86071c37925f38e (diff)
Fix missing include of sys/stat.h
Instead of relying on very indirect includes, it's more more clean when everybody explicitly includes what he really needs. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1417>
-rw-r--r--hw/xfree86/common/xf86Config.c1
-rw-r--r--hw/xfree86/common/xf86Helper.c2
-rw-r--r--hw/xfree86/common/xf86Init.c1
-rw-r--r--hw/xfree86/os-support/shared/sigio.c1
-rw-r--r--hw/xfree86/os-support/solaris/sun_init.c1
-rw-r--r--hw/xfree86/os-support/xf86_OSlib.h4
-rw-r--r--hw/xquartz/darwin.c1
7 files changed, 7 insertions, 4 deletions
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 41acb25aa..c3d87fbe2 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -46,6 +46,7 @@
#include <xorg-config.h>
#endif
+#include <sys/stat.h>
#include <sys/types.h>
#include <grp.h>
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 2786e6c6c..85bd3bb33 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -38,7 +38,9 @@
#include <xorg-config.h>
#endif
+#include <sys/stat.h>
#include <X11/X.h>
+
#include "mi.h"
#include "os.h"
#include "servermd.h"
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 3308329a1..2f25272a5 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -36,6 +36,7 @@
#include <stdlib.h>
#include <errno.h>
+#include <sys/stat.h>
#undef HAS_UTSNAME
#if !defined(WIN32)
diff --git a/hw/xfree86/os-support/shared/sigio.c b/hw/xfree86/os-support/shared/sigio.c
index be78b9eaa..67de2e925 100644
--- a/hw/xfree86/os-support/shared/sigio.c
+++ b/hw/xfree86/os-support/shared/sigio.c
@@ -57,6 +57,7 @@
#endif
#include <errno.h>
+#include <sys/stat.h>
#include <X11/X.h>
#include "os/osdep.h"
diff --git a/hw/xfree86/os-support/solaris/sun_init.c b/hw/xfree86/os-support/solaris/sun_init.c
index aac212707..99fd9fdf7 100644
--- a/hw/xfree86/os-support/solaris/sun_init.c
+++ b/hw/xfree86/os-support/solaris/sun_init.c
@@ -27,6 +27,7 @@
#endif
#include <errno.h>
+#include <sys/stat.h>
#include "../../../../os/cmdline.h"
diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h
index 8d321dc01..3f8dae067 100644
--- a/hw/xfree86/os-support/xf86_OSlib.h
+++ b/hw/xfree86/os-support/xf86_OSlib.h
@@ -88,7 +88,6 @@
#include <sys/ioctl.h>
#include <signal.h>
#include <termio.h>
-#include <sys/stat.h>
#include <sys/types.h>
#include <errno.h>
@@ -155,8 +154,6 @@ extern _X_HIDDEN char xf86SolarisFbDev[PATH_MAX];
#include <errno.h>
-#include <sys/stat.h>
-
#include <sys/mman.h>
#ifdef __linux__
#define HAS_USL_VTS
@@ -185,7 +182,6 @@ extern _X_HIDDEN char xf86SolarisFbDev[PATH_MAX];
#include <sys/types.h>
#include <sys/mman.h>
-#include <sys/stat.h>
#endif /* CSRG_BASED */
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index 167973845..56530ec30 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -32,6 +32,7 @@
#include <dix-config.h>
#endif
+#include <sys/stat.h>
#include <X11/X.h>
#include <X11/Xproto.h>