diff --git a/tpm2.0-tools-fix-gcc7.patch b/tpm2.0-tools-fix-gcc7.patch new file mode 100644 index 0000000..8eb684e --- /dev/null +++ b/tpm2.0-tools-fix-gcc7.patch @@ -0,0 +1,26 @@ +Index: tpm2.0-tools-2.0.0/tools/main.c +=================================================================== +--- tpm2.0-tools-2.0.0.orig/tools/main.c ++++ tpm2.0-tools-2.0.0/tools/main.c +@@ -61,7 +61,7 @@ main (int argc, + execute_man (argv[0], envp); + fprintf (stderr, + "failed to load manpage, check your environment / PATH\n"); +- /* no break */ ++ /* FALLTHROUGH */ + case 2: + exit (1); + } +Index: tpm2.0-tools-2.0.0/tools/tpm2_dump_capability.c +=================================================================== +--- tpm2.0-tools-2.0.0.orig/tools/tpm2_dump_capability.c ++++ tpm2.0-tools-2.0.0/tools/tpm2_dump_capability.c +@@ -595,7 +595,7 @@ dump_tpm_capability (TPMU_CAPABILITIES + case TPM_CAP_COMMANDS: + dump_command_attr_array (capabilities->command.commandAttributes, + capabilities->command.count); +- /* no break */ ++ /* FALLTHROUGH */ + default: + return 1; + } diff --git a/tpm2.0-tools.spec b/tpm2.0-tools.spec index f903423..f1d37dd 100644 --- a/tpm2.0-tools.spec +++ b/tpm2.0-tools.spec @@ -25,6 +25,7 @@ Group: Productivity/Security Url: https://github.com/01org/tpm2.0-tools Source0: https://github.com/01org/tpm2.0-tools/archive/%{version}.zip Patch0: tpm2.0-tools-fix-hardening.patch +Patch1: tpm2.0-tools-fix-gcc7.patch BuildRequires: autoconf-archive BuildRequires: automake BuildRequires: gcc-c++ @@ -46,6 +47,7 @@ associated interfaces. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build bash ./bootstrap