From 72e80c12030775fbe004bb08512b855ba7e8ebb2 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 26 Feb 2024 17:33:45 +0100 Subject: [PATCH] (submit/xfuncproto) fix mising includes of Several places using _X_ATTRIBUTE_PRINTF macro from X11/Xfuncproto.h but missing to include it, so it depends on other headers whether it's included by mere accident, which quickly causes trouble if include order changes. Cleaning that up by adding explicit include statements. Signed-off-by: Enrico Weigelt, metux IT consult --- Xext/security.c | 1 + Xext/xselinux_hooks.c | 1 + glamor/glamor_priv.h | 2 ++ hw/xfree86/common/xf86.h | 2 ++ hw/xfree86/common/xf86Xinput.h | 2 ++ hw/xfree86/dri/dri.c | 1 + hw/xfree86/parser/configProcs.h | 2 ++ hw/xquartz/darwin.h | 2 ++ hw/xquartz/mach-startup/bundle-main.c | 2 ++ hw/xquartz/pbproxy/pbproxy.h | 1 + hw/xwayland/xwayland-screen.c | 1 + hw/xwayland/xwayland.c | 1 + hw/xwin/win.h | 2 ++ include/os.h | 2 ++ os/log.c | 1 + pseudoramiX/pseudoramiX.c | 5 ++++- 16 files changed, 27 insertions(+), 1 deletion(-) diff --git a/Xext/security.c b/Xext/security.c index 8c8412041..09f0b0e05 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -29,6 +29,7 @@ in this Software without prior written authorization from The Open Group. #endif #include +#include #include "dix/dix_priv.h" #include "dix/registry_priv.h" diff --git a/Xext/xselinux_hooks.c b/Xext/xselinux_hooks.c index 63fc18f93..65cb60217 100644 --- a/Xext/xselinux_hooks.c +++ b/Xext/xselinux_hooks.c @@ -32,6 +32,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include +#include #include "dix/registry_priv.h" diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h index 5a0dc2e2d..f80aab74b 100644 --- a/glamor/glamor_priv.h +++ b/glamor/glamor_priv.h @@ -29,6 +29,8 @@ #include "dix-config.h" +#include + #include "glamor.h" #include "xvdix.h" diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index 8d0cb0532..729cb22a7 100644 --- a/hw/xfree86/common/xf86.h +++ b/hw/xfree86/common/xf86.h @@ -41,6 +41,8 @@ #include #endif +#include + #include "xf86str.h" #include "xf86Opt.h" #include diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h index e73aff269..6c4eaede1 100644 --- a/hw/xfree86/common/xf86Xinput.h +++ b/hw/xfree86/common/xf86Xinput.h @@ -51,6 +51,8 @@ #ifndef _xf86Xinput_h #define _xf86Xinput_h +#include + #include "xf86.h" #include "xf86str.h" #include "inputstr.h" diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c index 957fb2346..7ba879ce3 100644 --- a/hw/xfree86/dri/dri.c +++ b/hw/xfree86/dri/dri.c @@ -44,6 +44,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include +#include #include #include "dix/dix_priv.h" diff --git a/hw/xfree86/parser/configProcs.h b/hw/xfree86/parser/configProcs.h index 7a46e0160..39399b7bc 100644 --- a/hw/xfree86/parser/configProcs.h +++ b/hw/xfree86/parser/configProcs.h @@ -29,6 +29,8 @@ /* exported functions are/were used by the X Server */ +#include + /* Device.c */ XF86ConfDevicePtr xf86parseDeviceSection(void); void xf86printDeviceSection(FILE * cf, XF86ConfDevicePtr ptr); diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h index 3cae50b2a..c434d4838 100644 --- a/hw/xquartz/darwin.h +++ b/hw/xquartz/darwin.h @@ -29,6 +29,8 @@ #define _DARWIN_H #include +#include + #include "inputstr.h" #include "scrnintstr.h" #include diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c index 5c5bc70ac..a2c18e1e1 100644 --- a/hw/xquartz/mach-startup/bundle-main.c +++ b/hw/xquartz/mach-startup/bundle-main.c @@ -36,6 +36,8 @@ #include #include +#include + #include #include #include diff --git a/hw/xquartz/pbproxy/pbproxy.h b/hw/xquartz/pbproxy/pbproxy.h index 482f95ea6..ae3a8d34e 100644 --- a/hw/xquartz/pbproxy/pbproxy.h +++ b/hw/xquartz/pbproxy/pbproxy.h @@ -37,6 +37,7 @@ #define Cursor X_Cursor #undef _SHAPE_H_ +#include #include #include #undef Cursor diff --git a/hw/xwayland/xwayland-screen.c b/hw/xwayland/xwayland-screen.c index c517ba81a..62acff9a5 100644 --- a/hw/xwayland/xwayland-screen.c +++ b/hw/xwayland/xwayland-screen.c @@ -35,6 +35,7 @@ #endif #include +#include #include "miext/extinit_priv.h" #include "os/osdep.h" diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c index 2cd262eb7..cbad2e253 100644 --- a/hw/xwayland/xwayland.c +++ b/hw/xwayland/xwayland.c @@ -33,6 +33,7 @@ #include #include +#include #include "dix/dix_priv.h" #include "dix/screenint_priv.h" diff --git a/hw/xwin/win.h b/hw/xwin/win.h index 1c4af37e1..49a2031d3 100644 --- a/hw/xwin/win.h +++ b/hw/xwin/win.h @@ -139,9 +139,11 @@ #endif /* HAVE_MMAP */ #include +#include #include #include #include + #include "scrnintstr.h" #include "pixmapstr.h" #include "pixmap.h" diff --git a/include/os.h b/include/os.h index 4f193795c..4b6bcaac9 100644 --- a/include/os.h +++ b/include/os.h @@ -58,6 +58,8 @@ SOFTWARE. #include #endif +#include + #define SCREEN_SAVER_ON 0 #define SCREEN_SAVER_OFF 1 #define SCREEN_SAVER_FORCER 2 diff --git a/os/log.c b/os/log.c index 9a702122b..10d95ce11 100644 --- a/os/log.c +++ b/os/log.c @@ -85,6 +85,7 @@ OR PERFORMANCE OF THIS SOFTWARE. #include /* for malloc() */ #include #include +#include #include #include "dix/dix_priv.h" diff --git a/pseudoramiX/pseudoramiX.c b/pseudoramiX/pseudoramiX.c index 640daa983..aad695542 100644 --- a/pseudoramiX/pseudoramiX.c +++ b/pseudoramiX/pseudoramiX.c @@ -37,6 +37,10 @@ #include #endif +#include +#include +#include + #include "miext/extinit_priv.h" #include "pseudoramiX.h" @@ -44,7 +48,6 @@ #include "nonsdk_extinit.h" #include "dixstruct.h" #include "window.h" -#include #include "globals.h" #define TRACE PseudoramiXTrace("TRACE " __FILE__ ":%s",__FUNCTION__)