diff --git a/backends/xnnpack/third-party/cpuinfo-wrappers/arm/mach/init.c b/backends/xnnpack/third-party/cpuinfo-wrappers/arm/mach/init.c index 47a71a6ba72..6316d8efd4f 100644 --- a/backends/xnnpack/third-party/cpuinfo-wrappers/arm/mach/init.c +++ b/backends/xnnpack/third-party/cpuinfo-wrappers/arm/mach/init.c @@ -4,6 +4,6 @@ #include #endif /* __APPLE__ */ -#if (defined(__arm__) || defined(__aarch64__)) && defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE +#if (defined(__arm__) || defined(__aarch64__)) && defined(TARGET_OS_MAC) && TARGET_OS_MAC #include -#endif /* (defined(__arm__) || defined(__aarch64__)) && defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE */ +#endif /* (defined(__arm__) || defined(__aarch64__)) && defined(TARGET_OS_MAC) && TARGET_OS_MAC */ diff --git a/backends/xnnpack/third-party/generate-cpuinfo-wrappers.py b/backends/xnnpack/third-party/generate-cpuinfo-wrappers.py index 4d5f2a1dce4..a04ef9e1dcf 100644 --- a/backends/xnnpack/third-party/generate-cpuinfo-wrappers.py +++ b/backends/xnnpack/third-party/generate-cpuinfo-wrappers.py @@ -63,7 +63,7 @@ "(defined(__arm__) || defined(__aarch64__)) && defined(__ANDROID__)": [ "arm/android/properties.c", ], - "(defined(__arm__) || defined(__aarch64__)) && defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE": [ + "(defined(__arm__) || defined(__aarch64__)) && defined(TARGET_OS_MAC) && TARGET_OS_MAC": [ "arm/mach/init.c", ],}