diff --git a/kstool/CMakeLists.txt b/kstool/CMakeLists.txt
index b6d16f35af1b2fd95fdbcd554554af3b20268c25..d6240d840465a0ba696f5eaabe90aa512008ab61 100644
--- a/kstool/CMakeLists.txt
+++ b/kstool/CMakeLists.txt
@@ -7,7 +7,7 @@ project(kstool)
 
 include_directories("../include")
 
-add_executable(kstool kstool.c)
+add_executable(kstool kstool.cpp)
 
 target_link_libraries(kstool keystone)
 
diff --git a/kstool/kstool.c b/kstool/kstool.cpp
similarity index 100%
rename from kstool/kstool.c
rename to kstool/kstool.cpp