diff --git a/.gitignore b/.gitignore
index 6582457..9016c12 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /tpm2.0-tools-2.1.0.tar.gz
+/gcc7-implicit-fallthrough-complaining-fix.patch
diff --git a/gcc7-implicit-fallthrough-complaining-fix.patch b/gcc7-implicit-fallthrough-complaining-fix.patch
new file mode 100644
index 0000000..3f2da1f
--- /dev/null
+++ b/gcc7-implicit-fallthrough-complaining-fix.patch
@@ -0,0 +1,40 @@
+From 1321aee7d2a3be248d32b012ee6d2a4452435690 Mon Sep 17 00:00:00 2001
+From: Philip Tricca <flihp@twobit.us>
+Date: Thu, 27 Jul 2017 21:08:53 -0700
+Subject: [PATCH] gcc7: Change two case fallthrough conditions that upset gcc7.
+
+Signed-off-by: Philip Tricca <flihp@twobit.us>
+---
+ tools/main.c                 | 2 +-
+ tools/tpm2_dump_capability.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tools/main.c b/tools/main.c
+index 4f1fd83..67148be 100644
+--- a/tools/main.c
++++ b/tools/main.c
+@@ -60,7 +60,7 @@ main (int   argc,
+     case 1:
+         execute_man (argv[0], envp);
+         LOG_ERR ("failed to load manpage, check your environment / PATH\n");
+-        /* fallthrough */
++        exit (1);
+     case 2:
+         exit (1);
+     }
+diff --git a/tools/tpm2_dump_capability.c b/tools/tpm2_dump_capability.c
+index 728dce7..1c56dbc 100644
+--- a/tools/tpm2_dump_capability.c
++++ b/tools/tpm2_dump_capability.c
+@@ -600,7 +600,7 @@ dump_tpm_capability (TPMU_CAPABILITIES    *capabilities,
+     case TPM_CAP_COMMANDS:
+         dump_command_attr_array (capabilities->command.commandAttributes,
+                                  capabilities->command.count);
+-        /* fallthrough */
++        break;
+     default:
+         return 1;
+     }
+-- 
+1.8.3.1
+
diff --git a/sources b/sources
index e3aa564..49fe742 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (tpm2.0-tools-2.1.0.tar.gz) = 5488ffdc42a318fae9a307a333cdbce730a144cea847fe68546367c87689cd675d1376c1a638dc4eefa6231d4d7f7417215cc4eb606e999a757425f5097eb0c4
+SHA512 (gcc7-implicit-fallthrough-complaining-fix.patch) = eb4f8c1df2c294e2b286c71c1c3cd99b0b263da4c5044490024b2c3e98edad5cd707faa7711c8d6192953000861196e5a204144f7111354967bdb40bfc0cbeef
diff --git a/tpm2-tools.spec b/tpm2-tools.spec
index 63e76d4..dcf1aa6 100644
--- a/tpm2-tools.spec
+++ b/tpm2-tools.spec
@@ -1,6 +1,6 @@
 Name: tpm2-tools
 Version: 2.1.0 
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: A TPM2.0 testing tool build upon TPM2.0-TSS
 
 %global pkg_prefix tpm2.0-tools
@@ -9,6 +9,9 @@ License: BSD
 URL:     https://github.com/01org/tpm2.0-tools
 Source0: https://github.com/01org/tpm2.0-tools/archive/%{version}.tar.gz#/%{pkg_prefix}-%{version}.tar.gz
 
+# https://github.com/01org/tpm2.0-tools/pull/381
+Patch0: gcc7-implicit-fallthrough-complaining-fix.patch
+
 BuildRequires: gcc-c++
 BuildRequires: libtool
 BuildRequires: autoconf-archive
@@ -48,6 +51,9 @@ tpm2-tools is a batch of testing tools for tpm2.0. It is based on tpm2-tss.
 %{_mandir}/man8/tpm2_*.8.gz
 
 %changelog
+* Mon Jul 31 2017 Sun Yunying <yunying.sun@intel.com> - 2.1.0-2
+- Add patch to fix build error about implict-fallthrough
+
 * Fri Jul 28 2017 Sun Yunying <yunying.sun@intel.com> - 2.1.0-1
 - Update to latest upstream release 2.1.0