diff options
author | Hao Lu <hlu@fb.com> | 2017-10-23 15:16:50 -0700 |
---|---|---|
committer | Marat Dukhan <marat@fb.com> | 2017-10-23 15:16:50 -0700 |
commit | 3617d5b0f9c19facda2cb6750d9cadf856b0770d (patch) | |
tree | 38bed182b326679769c360857d2906595dcdd8cc /include/cpuinfo.h | |
parent | b1662f4f719fde65be2d4a072005e5e02b88d5fa (diff) | |
download | cpuinfo-3617d5b0f9c19facda2cb6750d9cadf856b0770d.tar.gz |
Detect GPU name on iOS
Diffstat (limited to 'include/cpuinfo.h')
-rw-r--r-- | include/cpuinfo.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/cpuinfo.h b/include/cpuinfo.h index ac12492..cae8af9 100644 --- a/include/cpuinfo.h +++ b/include/cpuinfo.h @@ -6,6 +6,10 @@ #include <stdbool.h> #endif +#ifdef __APPLE__ + #include <TargetConditionals.h> +#endif + #include <stdint.h> /* Identify architecture and define corresponding macro */ @@ -466,7 +470,7 @@ struct cpuinfo_core { struct cpuinfo_package { /** SoC or processor chip model name */ char name[CPUINFO_PACKAGE_NAME_MAX]; -#ifdef __ANDROID__ +#if defined(__ANDROID__) || (defined(__APPLE__) && TARGET_OS_IPHONE) /** Integrated GPU model name */ char gpu_name[CPUINFO_GPU_NAME_MAX]; #endif |