From fdf0acbf972340d38a74cb1f3860c2d44b728e2e Mon Sep 17 00:00:00 2001
From: iDunk5400 <iDunk5400@users.noreply.github.com>
Date: Wed, 15 Nov 2017 23:12:02 +0100
Subject: [PATCH] Tools, daemonizer: fix building on Windows

---
 src/common/util.h                     | 5 +++++
 src/daemonizer/windows_daemonizer.inl | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/common/util.h b/src/common/util.h
index 1aac026c1..53ff78af8 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -39,6 +39,11 @@
 #include <memory>
 #include <string>
 
+#ifdef _WIN32
+#include "windows.h"
+#include "misc_log_ex.h"
+#endif
+
 #include "crypto/hash.h"
 
 /*! \brief Various Tools
diff --git a/src/daemonizer/windows_daemonizer.inl b/src/daemonizer/windows_daemonizer.inl
index 012cd1e67..e02468125 100644
--- a/src/daemonizer/windows_daemonizer.inl
+++ b/src/daemonizer/windows_daemonizer.inl
@@ -111,9 +111,9 @@ namespace daemonizer
   {
     if (command_line::has_arg(vm, arg_is_service))
     {
-      if (command_line::has_arg(vm, command_line::arg_data_dir))
+      if (command_line::has_arg(vm, cryptonote::arg_data_dir))
       {
-        return command_line::get_arg(vm, command_line::arg_data_dir);
+        return command_line::get_arg(vm, cryptonote::arg_data_dir);
       }
       else
       {