diff --git a/libretroshare/src/dbase/fimonitor.cc b/libretroshare/src/dbase/fimonitor.cc index b475225f3..87df327fd 100644 --- a/libretroshare/src/dbase/fimonitor.cc +++ b/libretroshare/src/dbase/fimonitor.cc @@ -45,6 +45,7 @@ #include #include #include +#include //*********** //#define FIM_DEBUG 1 diff --git a/libretroshare/src/dbase/findex.cc b/libretroshare/src/dbase/findex.cc index 9fb7c63ab..d04101213 100644 --- a/libretroshare/src/dbase/findex.cc +++ b/libretroshare/src/dbase/findex.cc @@ -36,6 +36,7 @@ #include #include #include +#include #include #include diff --git a/libretroshare/src/dbase/fistore.cc b/libretroshare/src/dbase/fistore.cc index 5a81d5bc8..565165433 100644 --- a/libretroshare/src/dbase/fistore.cc +++ b/libretroshare/src/dbase/fistore.cc @@ -21,6 +21,8 @@ * */ +#include + #include "dbase/fistore.h" #include "retroshare/rsexpr.h" #include "retroshare/rsfiles.h" diff --git a/libretroshare/src/ft/ftcontroller.cc b/libretroshare/src/ft/ftcontroller.cc index a4328fdd4..4ab0be5d3 100644 --- a/libretroshare/src/ft/ftcontroller.cc +++ b/libretroshare/src/ft/ftcontroller.cc @@ -62,6 +62,7 @@ #include "serialiser/rsconfigitems.h" #include #include /* for (u)sleep() */ +#include /****** * #define CONTROL_DEBUG 1 diff --git a/libretroshare/src/ft/ftdatamultiplex.cc b/libretroshare/src/ft/ftdatamultiplex.cc index 802dbb6d3..6267a05b2 100644 --- a/libretroshare/src/ft/ftdatamultiplex.cc +++ b/libretroshare/src/ft/ftdatamultiplex.cc @@ -36,6 +36,7 @@ #include "ft/ftsearch.h" #include "util/rsdir.h" #include +#include /* For Thread Behaviour */ const uint32_t DMULTIPLEX_MIN = 10; /* 1ms sleep */ diff --git a/libretroshare/src/ft/ftextralist.cc b/libretroshare/src/ft/ftextralist.cc index 5fcca5188..56fffb3ca 100644 --- a/libretroshare/src/ft/ftextralist.cc +++ b/libretroshare/src/ft/ftextralist.cc @@ -34,6 +34,7 @@ #include "util/rsdir.h" #include #include /* for (u)sleep() */ +#include /****** * #define DEBUG_ELIST 1 diff --git a/libretroshare/src/ft/ftfilecreator.cc b/libretroshare/src/ft/ftfilecreator.cc index a835caf16..b3703d1d2 100644 --- a/libretroshare/src/ft/ftfilecreator.cc +++ b/libretroshare/src/ft/ftfilecreator.cc @@ -1,6 +1,7 @@ #include "ftfilecreator.h" #include #include +#include #include #include diff --git a/libretroshare/src/ft/ftfileprovider.cc b/libretroshare/src/ft/ftfileprovider.cc index 775e368b0..991e968f1 100644 --- a/libretroshare/src/ft/ftfileprovider.cc +++ b/libretroshare/src/ft/ftfileprovider.cc @@ -8,6 +8,7 @@ #include "util/rsdir.h" #include #include +#include /******** * #define DEBUG_FT_FILE_PROVIDER 1 diff --git a/libretroshare/src/ft/ftserver.cc b/libretroshare/src/ft/ftserver.cc index 8c802d5e6..935c1588f 100644 --- a/libretroshare/src/ft/ftserver.cc +++ b/libretroshare/src/ft/ftserver.cc @@ -25,6 +25,7 @@ #include /* for (u)sleep() */ #include +#include #include "util/rsdebug.h" #include "util/rsdir.h" #include "retroshare/rstypes.h" diff --git a/libretroshare/src/ft/fttransfermodule.cc b/libretroshare/src/ft/fttransfermodule.cc index c6d911a7d..8f60913d3 100644 --- a/libretroshare/src/ft/fttransfermodule.cc +++ b/libretroshare/src/ft/fttransfermodule.cc @@ -27,6 +27,8 @@ * #define FT_DEBUG 1 *****/ +#include + #include "retroshare/rsturtle.h" #include "fttransfermodule.h" diff --git a/libretroshare/src/pqi/authssl.cc b/libretroshare/src/pqi/authssl.cc index 68e33c119..623c061cb 100644 --- a/libretroshare/src/pqi/authssl.cc +++ b/libretroshare/src/pqi/authssl.cc @@ -92,7 +92,7 @@ static void locking_function(int mode, int n, const char */*file*/, int /*line*/ */ static unsigned long id_function(void) { -#ifdef WINDOWS_SYS +#if defined( WINDOWS_SYS) && !defined(WIN_PTHREADS_H) return (unsigned long) pthread_self().p; #else return (unsigned long) pthread_self(); diff --git a/libretroshare/src/pqi/p3dhtmgr.cc b/libretroshare/src/pqi/p3dhtmgr.cc index 0abb0dee3..a93577581 100644 --- a/libretroshare/src/pqi/p3dhtmgr.cc +++ b/libretroshare/src/pqi/p3dhtmgr.cc @@ -27,6 +27,7 @@ #include #include #include +#include #include "pqi/p3dhtmgr.h" #include "pqi/p3peermgr.h" diff --git a/libretroshare/src/pqi/p3historymgr.cc b/libretroshare/src/pqi/p3historymgr.cc index 04460c59f..3a7e636c2 100644 --- a/libretroshare/src/pqi/p3historymgr.cc +++ b/libretroshare/src/pqi/p3historymgr.cc @@ -23,6 +23,8 @@ * */ +#include + #include "p3historymgr.h" #include "serialiser/rshistoryitems.h" #include "serialiser/rsconfigitems.h" diff --git a/libretroshare/src/pqi/p3netmgr.cc b/libretroshare/src/pqi/p3netmgr.cc index aa2a3361c..ca57dd333 100644 --- a/libretroshare/src/pqi/p3netmgr.cc +++ b/libretroshare/src/pqi/p3netmgr.cc @@ -23,6 +23,8 @@ * */ +#include + #include "pqi/p3netmgr.h" #include "pqi/p3peermgr.h" diff --git a/libretroshare/src/pqi/pqihandler.cc b/libretroshare/src/pqi/pqihandler.cc index 834bc1353..d786e2a62 100644 --- a/libretroshare/src/pqi/pqihandler.cc +++ b/libretroshare/src/pqi/pqihandler.cc @@ -28,6 +28,7 @@ #include "util/rsdebug.h" #include "util/rsstring.h" #include +#include const int pqihandlerzone = 34283; static const int PQI_HANDLER_NB_PRIORITY_LEVELS = 10 ; diff --git a/libretroshare/src/pqi/pqistreamer.cc b/libretroshare/src/pqi/pqistreamer.cc index 1b66ba135..070f466eb 100644 --- a/libretroshare/src/pqi/pqistreamer.cc +++ b/libretroshare/src/pqi/pqistreamer.cc @@ -26,6 +26,7 @@ #include #include +#include #include "util/rsdebug.h" #include "util/rsstring.h" diff --git a/libretroshare/src/serialiser/rsmsgitems.cc b/libretroshare/src/serialiser/rsmsgitems.cc index a86252269..7f9be5bf8 100644 --- a/libretroshare/src/serialiser/rsmsgitems.cc +++ b/libretroshare/src/serialiser/rsmsgitems.cc @@ -25,6 +25,7 @@ */ #include +#include #include "serialiser/rsbaseserial.h" #include "serialiser/rsmsgitems.h" #include "serialiser/rstlvbase.h" diff --git a/libretroshare/src/services/p3dsdv.cc b/libretroshare/src/services/p3dsdv.cc index 157ec1c8e..613e0b8a9 100644 --- a/libretroshare/src/services/p3dsdv.cc +++ b/libretroshare/src/services/p3dsdv.cc @@ -25,6 +25,7 @@ #include #include +#include //#include "serialiser/rsdsdvitems.h" #include "services/p3dsdv.h" diff --git a/libretroshare/src/services/p3service.cc b/libretroshare/src/services/p3service.cc index 7a16d5756..9b2c1992b 100644 --- a/libretroshare/src/services/p3service.cc +++ b/libretroshare/src/services/p3service.cc @@ -28,6 +28,10 @@ #include "services/p3service.h" #include +#ifdef WINDOWS_SYS +#include +#endif + /***** * #define SERV_DEBUG 1 ****/ diff --git a/libretroshare/src/services/p3statusservice.cc b/libretroshare/src/services/p3statusservice.cc index 73a3cf291..e21d3b963 100644 --- a/libretroshare/src/services/p3statusservice.cc +++ b/libretroshare/src/services/p3statusservice.cc @@ -31,6 +31,7 @@ #include #include #include +#include #include "pqi/p3linkmgr.h" diff --git a/libretroshare/src/tcponudp/tou.cc b/libretroshare/src/tcponudp/tou.cc index 9ea873ba9..bde8bb22d 100644 --- a/libretroshare/src/tcponudp/tou.cc +++ b/libretroshare/src/tcponudp/tou.cc @@ -32,6 +32,7 @@ static const int kInitStreamTable = 5; #include #include +#include #include "udp/udpstack.h" #include "tcpstream.h" diff --git a/libretroshare/src/tcponudp/udprelay.cc b/libretroshare/src/tcponudp/udprelay.cc index d9f671637..214482482 100644 --- a/libretroshare/src/tcponudp/udprelay.cc +++ b/libretroshare/src/tcponudp/udprelay.cc @@ -25,6 +25,7 @@ #include "udprelay.h" #include +#include /* * #define DEBUG_UDP_RELAY 1 diff --git a/libretroshare/src/tcponudp/udpstunner.cc b/libretroshare/src/tcponudp/udpstunner.cc index 4449bcadb..dea691053 100644 --- a/libretroshare/src/tcponudp/udpstunner.cc +++ b/libretroshare/src/tcponudp/udpstunner.cc @@ -25,6 +25,7 @@ #include "tcponudp/udpstunner.h" #include +#include #include "util/rsrandom.h" #include "util/rsprint.h" diff --git a/libretroshare/src/util/dnsresolver.cc b/libretroshare/src/util/dnsresolver.cc index cd9b312d5..0c0b92cab 100644 --- a/libretroshare/src/util/dnsresolver.cc +++ b/libretroshare/src/util/dnsresolver.cc @@ -13,6 +13,7 @@ #include #include #include +#include const time_t MAX_TIME_BEFORE_RETRY = 300 ; /* seconds before retrying an ip address */ const time_t MAX_KEEP_DNS_ENTRY = 3600 ; /* seconds during which a DNS entry is considered valid */ diff --git a/libretroshare/src/util/extaddrfinder.cc b/libretroshare/src/util/extaddrfinder.cc index f6fd43b33..437e73892 100644 --- a/libretroshare/src/util/extaddrfinder.cc +++ b/libretroshare/src/util/extaddrfinder.cc @@ -14,6 +14,7 @@ #include #include #include +#include const uint32_t MAX_IP_STORE = 300; /* seconds ip address timeout */ diff --git a/libretroshare/src/util/rsdebug.cc b/libretroshare/src/util/rsdebug.cc index 189418ec5..edce934a6 100644 --- a/libretroshare/src/util/rsdebug.cc +++ b/libretroshare/src/util/rsdebug.cc @@ -29,6 +29,7 @@ #include #include +#include const int RS_DEBUG_STDERR = 1; /* stuff goes to stderr */ const int RS_DEBUG_LOGFILE = 2; /* stuff goes to logfile */ diff --git a/libretroshare/src/util/rsdiscspace.cc b/libretroshare/src/util/rsdiscspace.cc index f2ebad099..6f8a9ac1a 100644 --- a/libretroshare/src/util/rsdiscspace.cc +++ b/libretroshare/src/util/rsdiscspace.cc @@ -25,6 +25,7 @@ #include #include +#include #include "retroshare/rsfiles.h" #include "retroshare/rsiface.h" #include "retroshare/rsinit.h" @@ -32,6 +33,8 @@ #include #ifndef WIN32 #include +#else +#include #endif #define DELAY_BETWEEN_CHECKS 2 diff --git a/libretroshare/src/util/rsrandom.cc b/libretroshare/src/util/rsrandom.cc index 95b869a80..03c8a95d9 100644 --- a/libretroshare/src/util/rsrandom.cc +++ b/libretroshare/src/util/rsrandom.cc @@ -16,8 +16,13 @@ RsMutex RSRandom::rndMtx("RSRandom") ; // have anyway) // #ifdef WINDOWS_SYS +#include +#ifdef WIN_PTHREADS_H +static bool auto_seed = RSRandom::seed( (time(NULL) + ((uint32_t) pthread_self())*0x1293fe)^0x18e34a12 ) ; +#else static bool auto_seed = RSRandom::seed( (time(NULL) + ((uint32_t) pthread_self().p)*0x1293fe)^0x18e34a12 ) ; #endif +#endif bool RSRandom::seed(uint32_t s) { diff --git a/libretroshare/src/util/rsstring.cc b/libretroshare/src/util/rsstring.cc index 3198ad3e6..bbaf4fbd9 100644 --- a/libretroshare/src/util/rsstring.cc +++ b/libretroshare/src/util/rsstring.cc @@ -28,8 +28,8 @@ #include #include #include -#include #endif +#include #include namespace librs { namespace util { diff --git a/libretroshare/src/util/rsthreads.cc b/libretroshare/src/util/rsthreads.cc index da2b5bf57..4012ca26f 100644 --- a/libretroshare/src/util/rsthreads.cc +++ b/libretroshare/src/util/rsthreads.cc @@ -29,7 +29,7 @@ #include /* for usleep() */ #include /* for usleep() */ #include - +#include #ifdef RSMUTEX_DEBUG #include diff --git a/retroshare-gui/src/gui/RetroShareLink.cpp b/retroshare-gui/src/gui/RetroShareLink.cpp index ada7a74ac..1d6521c6f 100644 --- a/retroshare-gui/src/gui/RetroShareLink.cpp +++ b/retroshare-gui/src/gui/RetroShareLink.cpp @@ -18,6 +18,7 @@ ***************************************************************************/ #include +#include #include #include #include