From 2a74ae550842cfe216bff28725e1a24db3b56792 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 27 Sep 2017 11:17:15 -0700 Subject: meson: Fix build of igt_x86-using tests on non-x86 platforms. Just stub out the features return value, and return an empty string. Signed-off-by: Eric Anholt Reviewed-by: Petri Latvala --- lib/igt_x86.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/igt_x86.h') diff --git a/lib/igt_x86.h b/lib/igt_x86.h index 589d224b..d6dcfa10 100644 --- a/lib/igt_x86.h +++ b/lib/igt_x86.h @@ -40,7 +40,19 @@ #define AVX 0x80 #define AVX2 0x100 +#if defined(__x86_64__) unsigned igt_x86_features(void); char *igt_x86_features_to_string(unsigned features, char *line); +#else +static inline unsigned igt_x86_features(void) +{ + return 0; +} +static inline char *igt_x86_features_to_string(unsigned features, char *line) +{ + line[0] = 0; + return line; +} +#endif #endif /* IGT_X86_H */ -- cgit v1.2.3