From a10b46be47794ab7c27329399f66f72f14d3ff76 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 13 Feb 2024 10:00:35 +0100 Subject: [PATCH] (submit/cleanup-api-xfree86) xfree86: move private definitions out of dri2.h public server module API headers shouldn't be clobbered with non-exported definitions, so move them out to private header file. Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xfree86/dri2/dri2.c | 2 +- hw/xfree86/dri2/dri2.h | 3 --- hw/xfree86/dri2/dri2_priv.h | 13 +++++++++++++ hw/xfree86/dri2/dri2ext.c | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 hw/xfree86/dri2/dri2_priv.h diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index 3397bb50c..1325f1f9f 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -42,7 +42,7 @@ #include "scrnintstr.h" #include "windowstr.h" #include "dixstruct.h" -#include "dri2.h" +#include "dri2_priv.h" #include "dri2int.h" #include "damage.h" #include "xf86.h" diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h index 4c14b705d..c17a3a27c 100644 --- a/hw/xfree86/dri2/dri2.h +++ b/hw/xfree86/dri2/dri2.h @@ -46,9 +46,6 @@ typedef struct { void *driverPrivate; } DRI2BufferRec, *DRI2BufferPtr; -extern CARD8 dri2_major; /* version of DRI2 supported by DDX */ -extern CARD8 dri2_minor; - typedef DRI2BufferRec DRI2Buffer2Rec, *DRI2Buffer2Ptr; typedef void (*DRI2SwapEventPtr) (ClientPtr client, void *data, int type, CARD64 ust, CARD64 msc, CARD32 sbc); diff --git a/hw/xfree86/dri2/dri2_priv.h b/hw/xfree86/dri2/dri2_priv.h new file mode 100644 index 000000000..f54aaa163 --- /dev/null +++ b/hw/xfree86/dri2/dri2_priv.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: MIT OR X11 + * + * Copyright © 2024 Enrico Weigelt, metux IT consult + */ +#ifndef _XSERVER_DRI2_PRIV_H_ +#define _XSERVER_DRI2_PRIV_H_ + +#include "dri2.h" + +extern CARD8 dri2_major; /* version of DRI2 supported by DDX */ +extern CARD8 dri2_minor; + +#endif /* _XSERVER_DRI2_PRIV_H_ */ diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c index 6a879a958..410c15ddc 100644 --- a/hw/xfree86/dri2/dri2ext.c +++ b/hw/xfree86/dri2/dri2ext.c @@ -46,7 +46,7 @@ #include "pixmapstr.h" #include "extnsionst.h" #include "xfixes.h" -#include "dri2.h" +#include "dri2_priv.h" #include "dri2int.h" #include "protocol-versions.h"