mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-06 21:58:57 -04:00
Merge remote-tracking branch 'upstream/master' into v0.6-FriendServer2
This commit is contained in:
commit
763eeffe25
3 changed files with 9 additions and 11 deletions
|
@ -26,9 +26,6 @@
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <arpa/inet.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
|
|
||||||
#include "util/rsnet.h"
|
#include "util/rsnet.h"
|
||||||
#include "util/rsprint.h"
|
#include "util/rsprint.h"
|
||||||
|
@ -48,8 +45,7 @@ FsNetworkInterface::FsNetworkInterface(const std::string& listening_address,uint
|
||||||
mClintListn = 0;
|
mClintListn = 0;
|
||||||
mClintListn = socket(AF_INET, SOCK_STREAM, 0); // creating socket
|
mClintListn = socket(AF_INET, SOCK_STREAM, 0); // creating socket
|
||||||
|
|
||||||
int flags = fcntl(mClintListn, F_GETFL);
|
unix_fcntl_nonblock(mClintListn);
|
||||||
fcntl(mClintListn, F_SETFL, flags | O_NONBLOCK);
|
|
||||||
|
|
||||||
struct sockaddr_in ipOfServer;
|
struct sockaddr_in ipOfServer;
|
||||||
memset(&ipOfServer, '0', sizeof(ipOfServer));
|
memset(&ipOfServer, '0', sizeof(ipOfServer));
|
||||||
|
@ -149,8 +145,7 @@ bool FsNetworkInterface::checkForNewConnections()
|
||||||
|
|
||||||
// Make the socket non blocking so that we can read from it and return if nothing comes
|
// Make the socket non blocking so that we can read from it and return if nothing comes
|
||||||
|
|
||||||
int flags = fcntl(clintConnt, F_GETFL);
|
unix_fcntl_nonblock(clintConnt);
|
||||||
fcntl(clintConnt, F_SETFL, flags | O_NONBLOCK);
|
|
||||||
|
|
||||||
// Create connection info
|
// Create connection info
|
||||||
|
|
||||||
|
|
|
@ -39,5 +39,12 @@ unix {
|
||||||
INSTALLS += target
|
INSTALLS += target
|
||||||
}
|
}
|
||||||
|
|
||||||
|
################################# Windows ##########################################
|
||||||
|
|
||||||
|
win32-g++|win32-clang-g++ {
|
||||||
|
dLib = ws2_32 iphlpapi crypt32
|
||||||
|
LIBS *= $$linkDynamicLibs(dLib)
|
||||||
|
}
|
||||||
|
|
||||||
################################### COMMON stuff ##################################
|
################################### COMMON stuff ##################################
|
||||||
|
|
||||||
|
|
|
@ -94,10 +94,6 @@ win32-g++|win32-clang-g++ {
|
||||||
CONFIG -= console
|
CONFIG -= console
|
||||||
}
|
}
|
||||||
|
|
||||||
# Switch on extra warnings
|
|
||||||
QMAKE_CFLAGS += -Wextra
|
|
||||||
QMAKE_CXXFLAGS += -Wextra
|
|
||||||
|
|
||||||
CONFIG(debug, debug|release) {
|
CONFIG(debug, debug|release) {
|
||||||
} else {
|
} else {
|
||||||
# Tell linker to use ASLR protection
|
# Tell linker to use ASLR protection
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue