Gestion pour que ça marche partout
This commit is contained in:
parent
a95dd02896
commit
3da8be6d52
@ -46,10 +46,11 @@ typedef uint64_t Timestamp;
|
||||
#include <cstdio>
|
||||
#include <ctime>
|
||||
|
||||
#define flag_t u_long
|
||||
#define addrlen_t int
|
||||
#define ioctl ioctlsocket
|
||||
#define SOCK_NONBLOCK FIONBIO
|
||||
#define strcpy strcpy_s
|
||||
#define addrlen_t int
|
||||
#define popen _popen
|
||||
#define pclose _pclose
|
||||
|
||||
@ -64,7 +65,7 @@ typedef uint64_t Timestamp;
|
||||
#include <netinet/in.h>
|
||||
#include <cstring>
|
||||
|
||||
|
||||
#define flag_t unsigned int
|
||||
#define addrlen_t unsigned int
|
||||
#define SOCKET int
|
||||
#define INVALID_SOCKET -1
|
||||
|
@ -57,7 +57,7 @@ int Connector::Connect(const char* srv_addr, std::string name) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
u_long flag = 1;
|
||||
flag_t flag = 1;
|
||||
if (ioctl(m_sock_tcp, SOCK_NONBLOCK, &flag) < 0) {
|
||||
std::cout << "Impossible de mettre le socket en mode non-bloquant." << std::endl;
|
||||
return 3;
|
||||
|
Loading…
Reference in New Issue
Block a user