summaryrefslogtreecommitdiffstats
path: root/src/glx/glxcmds.c
diff options
context:
space:
mode:
authorJon Turney <[email protected]>2018-12-14 13:20:10 +0000
committerJon Turney <[email protected]>2018-12-15 13:49:24 +0000
commitd512b35b62ff928b880a67887d36f1568aaa5e4b (patch)
tree5e8eac1526f684da75d6bf6cb2a1e47d52ab2129 /src/glx/glxcmds.c
parent29927e7524b07d491c555b8ed06c9b89cd0856f8 (diff)
glx: Fix compilation with GLX_USE_WINDOWSGL
Sadly, the GLX_USE_APPLEGL and GLX_USE_WINDOWSGL cases are not identical (because GLX_USE_WINDOWSGL uses vtables rather than a maze of ifdefs) Include <sys/time.h> again, as functions prototyped by it are used in the GLX_USE_WINDOWSGL path. Make the include guard around the __glxGetMscRate() definition match the one at it's declaration again, as it's referenced from dri_common.c which is built for GLX_USE_WINDOWSGL. Fixes: a95ec138 ("glx: mandate xf86vidmode only for "drm" dri platforms") Signed-off-by: Jon Turney <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/glx/glxcmds.c')
-rw-r--r--src/glx/glxcmds.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index d00c0d4816d..bde461b43a3 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -45,8 +45,8 @@
#include "apple/apple_glx.h"
#include "util/debug.h"
#else
-#ifndef GLX_USE_WINDOWSGL
#include <sys/time.h>
+#ifndef GLX_USE_WINDOWSGL
#include <X11/extensions/xf86vmode.h>
#endif /* GLX_USE_WINDOWSGL */
#endif
@@ -2083,11 +2083,12 @@ __glXGetSyncValuesOML(Display * dpy, GLXDrawable drawable,
return False;
}
-#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) && !defined(GLX_USE_WINDOWSGL)
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
_X_HIDDEN GLboolean
__glxGetMscRate(struct glx_screen *psc,
int32_t * numerator, int32_t * denominator)
{
+#if !defined(GLX_USE_WINDOWSGL)
XF86VidModeModeLine mode_line;
int dot_clock;
int i;
@@ -2134,6 +2135,7 @@ __glxGetMscRate(struct glx_screen *psc,
return True;
}
+#endif
return False;
}