From 3da8be6d5256c4ce0ac209abf2ad9435f046ea8e Mon Sep 17 00:00:00 2001 From: MarcEricMartel Date: Mon, 30 Oct 2023 11:11:13 -0400 Subject: [PATCH] =?UTF-8?q?Gestion=20pour=20que=20=C3=A7a=20marche=20parto?= =?UTF-8?q?ut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SQCSim-common/define.h | 5 +++-- SQCSim2021/connector.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/SQCSim-common/define.h b/SQCSim-common/define.h index b716121..05d90da 100644 --- a/SQCSim-common/define.h +++ b/SQCSim-common/define.h @@ -46,10 +46,11 @@ typedef uint64_t Timestamp; #include #include +#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 #include - +#define flag_t unsigned int #define addrlen_t unsigned int #define SOCKET int #define INVALID_SOCKET -1 diff --git a/SQCSim2021/connector.cpp b/SQCSim2021/connector.cpp index 831a952..3611a37 100644 --- a/SQCSim2021/connector.cpp +++ b/SQCSim2021/connector.cpp @@ -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;