diff --git a/include/tools/otherTools.h b/include/tools/otherTools.h index ecd4ab8ab..a6dc47234 100644 --- a/include/tools/otherTools.h +++ b/include/tools/otherTools.h @@ -20,18 +20,16 @@ #ifndef KIWIX_OTHERTOOLS_H #define KIWIX_OTHERTOOLS_H -#ifdef _WIN32 -#include -#else -#include -#endif +#include -#include +namespace pugi { + class xml_node; +} namespace kiwix { void sleep(unsigned int milliseconds); -std::string nodeToString(pugi::xml_node node); +std::string nodeToString(const pugi::xml_node& node); std::string converta2toa3(const std::string& a2code); } diff --git a/src/aria2.cpp b/src/aria2.cpp index 455b41c32..c63faf76f 100644 --- a/src/aria2.cpp +++ b/src/aria2.cpp @@ -15,9 +15,11 @@ # define ARIA2_CMD "aria2c.exe" #else # define ARIA2_CMD "aria2c" +# include #endif + namespace kiwix { Aria2::Aria2(): diff --git a/src/tools/otherTools.cpp b/src/tools/otherTools.cpp index 986c38f9d..538d87104 100644 --- a/src/tools/otherTools.cpp +++ b/src/tools/otherTools.cpp @@ -17,8 +17,17 @@ * MA 02110-1301, USA. */ -#include +#include "tools/otherTools.h" + +#ifdef _WIN32 +#include +#else +#include +#endif + #include +#include + static std::map codeisomapping { { "aa", "aar" }, @@ -185,7 +194,7 @@ struct XmlStringWriter: pugi::xml_writer } }; -std::string kiwix::nodeToString(pugi::xml_node node) +std::string kiwix::nodeToString(const pugi::xml_node& node) { XmlStringWriter writer; node.print(writer, " "); diff --git a/src/xmlrpc.h b/src/xmlrpc.h index f770bbc34..ad95b9e4d 100644 --- a/src/xmlrpc.h +++ b/src/xmlrpc.h @@ -4,6 +4,7 @@ #define KIWIX_XMLRPC_H_ #include +#include namespace kiwix {