tss2_structs.h contains a duplicate typedef as follows:
typedef TPMS_SCHEME_HASH_t TPMS_SCHEME_KDF2_t;

This causes a build failure when compiling with clang 14
that can be seen as follows:
export CC=clang
export CXX=clang++
./configure
make
In file included from ./grub-core/commands/tpm2_key_protector/tpm2.h:24:
./grub-core/lib/tss2/tss2_structs.h:278:28: error: redefinition of typedef 
'TPMS_SCHEME_KDF2_t' is a C11 feature [-Werror,-Wtypedef-redefinition]
typedef TPMS_SCHEME_HASH_t TPMS_SCHEME_KDF2_t;
                           ^
./grub-core/lib/tss2/tss2_structs.h:275:28: note: previous definition is here
typedef TPMS_SCHEME_HASH_t TPMS_SCHEME_KDF2_t;
                           ^
1 error generated.

Making the change proposed allows successfully building GRUB with clang 14.

Andrew Hamilton (1):
  lib: Fix clang Build - Remove Duplicate Typedef in TSS

 grub-core/lib/tss2/tss2_structs.h | 1 -
 1 file changed, 1 deletion(-)

-- 
2.39.5


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to