diff --git a/src/commands/CmdDiagnostics.cpp b/src/commands/CmdDiagnostics.cpp index aa1caf76b..ef33c2081 100644 --- a/src/commands/CmdDiagnostics.cpp +++ b/src/commands/CmdDiagnostics.cpp @@ -35,7 +35,9 @@ #include #include #include +#ifdef HAVE_COMMIT #include +#endif #ifdef HAVE_LIBGNUTLS #include @@ -136,7 +138,9 @@ int CmdDiagnostics::execute (std::string& output) // Build date. << " " << STRING_CMD_DIAG_BUILT << ": " << __DATE__ << " " << __TIME__ << "\n" +#ifdef HAVE_COMMIT << " " << STRING_CMD_DIAG_COMMIT << ": " << COMMIT << "\n" +#endif << " CMake: " << CMAKE_VERSION << "\n" << " " << STRING_CMD_DIAG_CAPS << ":" #ifdef HAVE_LIBPTHREAD diff --git a/src/commands/CmdVersion.cpp b/src/commands/CmdVersion.cpp index fc8e2ebee..93204ff56 100644 --- a/src/commands/CmdVersion.cpp +++ b/src/commands/CmdVersion.cpp @@ -30,7 +30,9 @@ #include #include #include +#ifdef HAVE_COMMIT #include +#endif #include #include #include