summaryrefslogtreecommitdiff
path: root/lib/igt_x86.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2017-10-12 10:33:37 +0200
committerThierry Reding <treding@nvidia.com>2017-11-06 15:58:39 +0100
commit4fbb4b9c12d1944e5d60bc4f3d0cbd0bf7bed36d (patch)
treea831698b103e92a6090ea72cb78a608510fdb13e /lib/igt_x86.c
parent7d2758f25d9c94e8a597718535857c586c3ca21c (diff)
lib: Fix compilation on non-x86
The meson build avoids the failure by excluding the igt_x86.c file from the compilation. autotools being what they are don't support that in an easy way, so just use the preprocessor to avoid the duplicate function definitions. Since igt_x86.c will now be ignored for non-x86 builds, the meson work- around can be removed. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'lib/igt_x86.c')
-rw-r--r--lib/igt_x86.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/igt_x86.c b/lib/igt_x86.c
index 0f0963ce..0ed3c6f1 100644
--- a/lib/igt_x86.c
+++ b/lib/igt_x86.c
@@ -93,6 +93,7 @@
#define has_YMM 0x1
+#if defined(__x86_64__) || defined(__i386__)
unsigned igt_x86_features(void)
{
unsigned max = __get_cpuid_max(BASIC_CPUID, 0);
@@ -172,3 +173,4 @@ char *igt_x86_features_to_string(unsigned features, char *line)
return ret;
}
+#endif