summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2024-02-25 17:27:00 -0500
committerMatt Turner <mattst88@gmail.com>2024-02-25 17:28:14 -0500
commit63332b4e72caace85b7e57b99592e61ca12fd777 (patch)
tree7cf458bff9df83cacad91f9e9753c329db9228d9
parent8c6d59a9f8b1c47377fc01646f1da8cfde274ccd (diff)
pixman-x86: Move #include "cpuid.h" inside conditionals
Closes: https://gitlab.freedesktop.org/pixman/pixman/-/issues/93 Closes: https://gitlab.freedesktop.org/pixman/pixman/-/issues/94
-rw-r--r--pixman/pixman-x86.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pixman/pixman-x86.c b/pixman/pixman-x86.c
index 87808db..2f688eb 100644
--- a/pixman/pixman-x86.c
+++ b/pixman/pixman-x86.c
@@ -22,7 +22,7 @@
#ifdef HAVE_CONFIG_H
#include <pixman-config.h>
#endif
-#include <cpuid.h>
+
#include "pixman-private.h"
#if defined(USE_X86_MMX) || defined (USE_SSE2) || defined (USE_SSSE3)
@@ -74,6 +74,10 @@ detect_cpu_features (void)
#else
+#if defined (__GNUC__)
+#include <cpuid.h>
+#endif
+
static void
pixman_cpuid (uint32_t feature,
uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d)