diff --git a/ThunkLibs/Generator/gen.cpp b/ThunkLibs/Generator/gen.cpp index 6b804ce53..7cbecc3ac 100644 --- a/ThunkLibs/Generator/gen.cpp +++ b/ThunkLibs/Generator/gen.cpp @@ -144,7 +144,7 @@ void GenerateThunkLibsAction::EmitLayoutWrappers(clang::ASTContext& context, std auto struct_name = get_type_name(context, type); // Opaque types don't need layout definitions - if (type_repack_info.assumed_compatible && type_repack_info.pointers_only) { + if (type_repack_info.assumed_compatible && type_repack_info.pointers_only && struct_name != "void") { if (guest_abi.pointer_size != 4) { fmt::print(file, "template<> inline constexpr bool has_compatible_data_layout<{}*> = true;\n", struct_name); } diff --git a/ThunkLibs/libGL/libGL_interface.cpp b/ThunkLibs/libGL/libGL_interface.cpp index a5a29c907..175bb793b 100644 --- a/ThunkLibs/libGL/libGL_interface.cpp +++ b/ThunkLibs/libGL/libGL_interface.cpp @@ -38,6 +38,11 @@ struct fex_gen_config : fexgen::custom_guest_entrypoint, template struct fex_gen_type {}; +// Assume void* always points to data with consistent layout. +// It's used in too many functions to annotate them all. +template<> +struct fex_gen_type : fexgen::opaque_type {}; + template<> struct fex_gen_type> : fexgen::opaque_type {}; template<>