mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-27 15:57:08 -05:00
Merge pull request #848 from PhenomRetroShare/Fix_WindowsCompil
Fix Windows Compilation
This commit is contained in:
commit
9121ff6eb3
@ -97,6 +97,7 @@ install:
|
|||||||
# Install toolchain
|
# Install toolchain
|
||||||
#- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain" #Already installed
|
#- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain" #Already installed
|
||||||
# Install other binutils
|
# Install other binutils
|
||||||
|
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-i686-curl mingw-w64-x86_64-curl"
|
||||||
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-i686-miniupnpc mingw-w64-x86_64-miniupnpc"
|
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-i686-miniupnpc mingw-w64-x86_64-miniupnpc"
|
||||||
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-i686-sqlite3 mingw-w64-x86_64-sqlite3"
|
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-i686-sqlite3 mingw-w64-x86_64-sqlite3"
|
||||||
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-i686-speex mingw-w64-x86_64-speex"
|
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-i686-speex mingw-w64-x86_64-speex"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <unistd.h> /* for usleep() */
|
||||||
|
|
||||||
#include "p3i2pbob.h"
|
#include "p3i2pbob.h"
|
||||||
|
|
||||||
@ -38,11 +39,7 @@ static struct RsLog::logInfo i2pBobLogInfo = {RsLog::Debug_All, "p3I2pBob"};
|
|||||||
static const time_t selfCheckPeroid = 30;
|
static const time_t selfCheckPeroid = 30;
|
||||||
|
|
||||||
void doSleep(useconds_t timeToSleepMS) {
|
void doSleep(useconds_t timeToSleepMS) {
|
||||||
#ifndef WINDOWS_SYS
|
|
||||||
usleep((useconds_t) (timeToSleepMS * 1000));
|
usleep((useconds_t) (timeToSleepMS * 1000));
|
||||||
#else
|
|
||||||
Sleep((int) (timeToSleepMS));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
p3I2pBob::p3I2pBob(p3PeerMgr *peerMgr)
|
p3I2pBob::p3I2pBob(p3PeerMgr *peerMgr)
|
||||||
|
@ -4,8 +4,10 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#ifndef WINDOWS_SYS
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "services/autoproxy/rsautoproxymonitor.h"
|
#include "services/autoproxy/rsautoproxymonitor.h"
|
||||||
#include "util/rsthreads.h"
|
#include "util/rsthreads.h"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#include "rsautoproxymonitor.h"
|
#include "rsautoproxymonitor.h"
|
||||||
|
|
||||||
|
#include <unistd.h> /* for usleep() */
|
||||||
|
|
||||||
rsAutoProxyMonitor *rsAutoProxyMonitor::mInstance = NULL;
|
rsAutoProxyMonitor *rsAutoProxyMonitor::mInstance = NULL;
|
||||||
|
|
||||||
rsAutoProxyMonitor::rsAutoProxyMonitor()
|
rsAutoProxyMonitor::rsAutoProxyMonitor()
|
||||||
@ -91,11 +93,7 @@ void rsAutoProxyMonitor::stopAllRSShutdown()
|
|||||||
// wait for shutdown of all services
|
// wait for shutdown of all services
|
||||||
uint32_t t = 0, timeout = 15;
|
uint32_t t = 0, timeout = 15;
|
||||||
do {
|
do {
|
||||||
#ifndef WINDOWS_SYS
|
|
||||||
usleep(1000 * 1000);
|
usleep(1000 * 1000);
|
||||||
#else
|
|
||||||
Sleep(1000);
|
|
||||||
#endif
|
|
||||||
RS_STACK_MUTEX(mLock);
|
RS_STACK_MUTEX(mLock);
|
||||||
std::cout << "(II) waiting for auto proxy service(s) to shut down " << t << "/" << timeout << " (remaining: " << mProxies.size() << ")" << std::endl;
|
std::cout << "(II) waiting for auto proxy service(s) to shut down " << t << "/" << timeout << " (remaining: " << mProxies.size() << ")" << std::endl;
|
||||||
if (mProxies.empty())
|
if (mProxies.empty())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user