diff -ruN cpu_features-0.4.0/include/cpuinfo_aarch64.h cpu_features-0.4.0-patch/include/cpuinfo_aarch64.h
--- cpu_features-0.4.0/include/cpuinfo_aarch64.h	2019-07-05 15:47:41.000000000 +0900
+++ cpu_features-0.4.0-patch/include/cpuinfo_aarch64.h	2019-07-16 18:03:58.907537797 +0900
@@ -61,10 +61,13 @@
 
 const char* GetAarch64FeaturesEnumName(Aarch64FeaturesEnum);
 
-CPU_FEATURES_END_CPP_NAMESPACE
-
 #if !defined(CPU_FEATURES_ARCH_AARCH64)
-#error "Including cpuinfo_aarch64.h from a non-aarch64 target."
+Aarch64Info GetAarch64Info(void) { return Aarch64Info(); }
+int GetAarch64FeaturesEnumValue(const Aarch64Features* features,
+                                Aarch64FeaturesEnum value) { return 0; }
+const char* GetAarch64FeaturesEnumName(Aarch64FeaturesEnum) { return NULL; }
 #endif
 
+CPU_FEATURES_END_CPP_NAMESPACE
+
 #endif  // CPU_FEATURES_INCLUDE_CPUINFO_AARCH64_H_
diff -ruN cpu_features-0.4.0/include/cpuinfo_arm.h cpu_features-0.4.0-patch/include/cpuinfo_arm.h
--- cpu_features-0.4.0/include/cpuinfo_arm.h	2019-07-05 15:47:41.000000000 +0900
+++ cpu_features-0.4.0-patch/include/cpuinfo_arm.h	2019-07-16 18:03:58.908537798 +0900
@@ -108,10 +108,13 @@
 
 const char* GetArmFeaturesEnumName(ArmFeaturesEnum);
 
-CPU_FEATURES_END_CPP_NAMESPACE
-
 #if !defined(CPU_FEATURES_ARCH_ARM)
-#error "Including cpuinfo_arm.h from a non-arm target."
+ArmInfo GetArmInfo(void) { return ArmInfo(); }
+uint32_t GetArmCpuId(const ArmInfo* const info) { return 0; }
+int GetArmFeaturesEnumValue(const ArmFeatures* features, ArmFeaturesEnum value) { return 0; }
+const char* GetArmFeaturesEnumName(ArmFeaturesEnum) { return NULL; }
 #endif
 
+CPU_FEATURES_END_CPP_NAMESPACE
+
 #endif  // CPU_FEATURES_INCLUDE_CPUINFO_ARM_H_
diff -ruN cpu_features-0.4.0/include/cpuinfo_mips.h cpu_features-0.4.0-patch/include/cpuinfo_mips.h
--- cpu_features-0.4.0/include/cpuinfo_mips.h	2019-07-05 15:47:41.000000000 +0900
+++ cpu_features-0.4.0-patch/include/cpuinfo_mips.h	2019-07-16 18:03:58.908537798 +0900
@@ -51,10 +51,13 @@
 
 const char* GetMipsFeaturesEnumName(MipsFeaturesEnum);
 
-CPU_FEATURES_END_CPP_NAMESPACE
-
 #if !defined(CPU_FEATURES_ARCH_MIPS)
-#error "Including cpuinfo_mips.h from a non-mips target."
+MipsInfo GetMipsInfo(void) { return MipsInfo(); }
+int GetMipsFeaturesEnumValue(const MipsFeatures* features,
+                             MipsFeaturesEnum value) { return 0; }
+const char* GetMipsFeaturesEnumName(MipsFeaturesEnum) { return NULL; }
 #endif
 
+CPU_FEATURES_END_CPP_NAMESPACE
+
 #endif  // CPU_FEATURES_INCLUDE_CPUINFO_MIPS_H_
diff -ruN cpu_features-0.4.0/include/cpuinfo_ppc.h cpu_features-0.4.0-patch/include/cpuinfo_ppc.h
--- cpu_features-0.4.0/include/cpuinfo_ppc.h	2019-07-05 15:47:41.000000000 +0900
+++ cpu_features-0.4.0-patch/include/cpuinfo_ppc.h	2019-07-16 18:03:58.909537798 +0900
@@ -137,10 +137,13 @@
 
 const char* GetPPCFeaturesEnumName(PPCFeaturesEnum);
 
-CPU_FEATURES_END_CPP_NAMESPACE
-
 #if !defined(CPU_FEATURES_ARCH_PPC)
-#error "Including cpuinfo_ppc.h from a non-ppc target."
+PPCInfo GetPPCInfo(void) { return PPCInfo(); }
+PPCPlatformStrings GetPPCPlatformStrings(void) { return PPCPlatformStrings(); }
+int GetPPCFeaturesEnumValue(const PPCFeatures* features, PPCFeaturesEnum value) { return 0; }
+const char* GetPPCFeaturesEnumName(PPCFeaturesEnum) { return NULL; }
 #endif
 
+CPU_FEATURES_END_CPP_NAMESPACE
+
 #endif  // CPU_FEATURES_INCLUDE_CPUINFO_PPC_H_
diff -ruN cpu_features-0.4.0/include/cpuinfo_x86.h cpu_features-0.4.0-patch/include/cpuinfo_x86.h
--- cpu_features-0.4.0/include/cpuinfo_x86.h	2019-07-05 15:47:41.000000000 +0900
+++ cpu_features-0.4.0-patch/include/cpuinfo_x86.h	2019-07-16 18:05:03.611574572 +0900
@@ -199,10 +199,16 @@
 
 const char* GetX86MicroarchitectureName(X86Microarchitecture);
 
-CPU_FEATURES_END_CPP_NAMESPACE
-
 #if !defined(CPU_FEATURES_ARCH_X86)
-#error "Including cpuinfo_x86.h from a non-x86 target."
+X86Info GetX86Info(void) { return X86Info(); }
+CacheInfo GetX86CacheInfo(void) { return CacheInfo(); }
+X86Microarchitecture GetX86Microarchitecture(const X86Info* info) { return X86Microarchitecture(); }
+void FillX86BrandString(char brand_string[49]) { }
+int GetX86FeaturesEnumValue(const X86Features* features, X86FeaturesEnum value) { return 0; }
+const char* GetX86FeaturesEnumName(X86FeaturesEnum) { return NULL; }
+const char* GetX86MicroarchitectureName(X86Microarchitecture) { return NULL; }
 #endif
 
+CPU_FEATURES_END_CPP_NAMESPACE
+
 #endif  // CPU_FEATURES_INCLUDE_CPUINFO_X86_H_
diff -ruN cpu_features-0.4.0/include/internal/hwcaps.h cpu_features-0.4.0-patch/include/internal/hwcaps.h
--- cpu_features-0.4.0/include/internal/hwcaps.h	2019-07-05 15:47:41.000000000 +0900
+++ cpu_features-0.4.0-patch/include/internal/hwcaps.h	2019-07-16 18:03:58.910537799 +0900
@@ -133,6 +133,11 @@
 
 PlatformType CpuFeatures_GetPlatformType(void);
 
+#if defined(__cplusplus) && defined(CPU_FEATURES_ARCH_X86)
+HardwareCapabilities CpuFeatures_GetHardwareCapabilities(void) { return HardwareCapabilities(); }
+PlatformType CpuFeatures_GetPlatformType(void) { return PlatformType(); }
+#endif
+
 CPU_FEATURES_END_CPP_NAMESPACE
 
 #endif  // CPU_FEATURES_INCLUDE_INTERNAL_HWCAPS_H_
