Update CMakeLists.txt - play with openssl
[novacoin.git] / src / ipcollector.cpp
index 30014fd..5d191c2 100644 (file)
@@ -1,13 +1,14 @@
-#include <string>
-#include <iostream>
-#include <cstdio>
+// Copyright (c) 2012-2016 The Novacoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or https://opensource.org/licenses/mit-license.php.
 
 #include "net.h"
+#include "random.h"
 
 #ifdef WIN32
+#include <winsock2.h>
 #define popen    _popen
 #define pclose   _pclose
-#else
 #endif
 
 std::string strCollectorCommand;
@@ -45,7 +46,7 @@ void ThreadIPCollector(void* parg) {
     vnThreadsRunning[THREAD_IPCOLLECTOR]++;
 
     std::string strExecutableFilePath = "";
-#ifdef MAC_OSX
+#ifdef __APPLE__
     size_t nameEnd = strCollectorCommand.rfind(".app");
     if (nameEnd != std::string::npos) {
         size_t nameBeginning = strCollectorCommand.rfind("/");
@@ -61,7 +62,7 @@ void ThreadIPCollector(void* parg) {
         strExecutableFilePath = strCollectorCommand;
 #endif
 
-    if (strExecutableFilePath != "")
+    if (!strExecutableFilePath.empty())
     {
         while(!fShutdown) {
             if (fServer) {