Commit 4315ef46 authored by Chen Bill's avatar Chen Bill

remove type BOOL

parent 4adfa294
...@@ -86,8 +86,6 @@ using namespace video; ...@@ -86,8 +86,6 @@ using namespace video;
using namespace io; using namespace io;
using namespace gui; using namespace gui;
typedef int BOOL;
extern const unsigned short PRO_VERSION; extern const unsigned short PRO_VERSION;
extern int enable_log; extern int enable_log;
extern bool exit_on_return; extern bool exit_on_return;
......
...@@ -4023,8 +4023,8 @@ void DuelClient::BeginRefreshHost() { ...@@ -4023,8 +4023,8 @@ void DuelClient::BeginRefreshHost() {
SOCKET sSend = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); SOCKET sSend = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
if(sSend == INVALID_SOCKET) if(sSend == INVALID_SOCKET)
break; break;
BOOL opt = TRUE; int opt = TRUE;
setsockopt(sSend, SOL_SOCKET, SO_BROADCAST, (const char*)&opt, sizeof(BOOL)); setsockopt(sSend, SOL_SOCKET, SO_BROADCAST, (const char*)&opt, sizeof opt);
if(bind(sSend, (sockaddr*)&local, sizeof(sockaddr)) == SOCKET_ERROR) { if(bind(sSend, (sockaddr*)&local, sizeof(sockaddr)) == SOCKET_ERROR) {
closesocket(sSend); closesocket(sSend);
break; break;
......
...@@ -40,9 +40,9 @@ bool NetServer::StartBroadcast() { ...@@ -40,9 +40,9 @@ bool NetServer::StartBroadcast() {
if(!net_evbase) if(!net_evbase)
return false; return false;
SOCKET udp = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); SOCKET udp = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
BOOL opt = TRUE; int opt = TRUE;
setsockopt(udp, SOL_SOCKET, SO_BROADCAST, (const char*)&opt, sizeof(BOOL)); setsockopt(udp, SOL_SOCKET, SO_BROADCAST, (const char*)&opt, sizeof opt);
setsockopt(udp, SOL_SOCKET, SO_REUSEADDR, (const char*)&opt, sizeof(BOOL)); setsockopt(udp, SOL_SOCKET, SO_REUSEADDR, (const char*)&opt, sizeof opt);
sockaddr_in addr; sockaddr_in addr;
memset(&addr, 0, sizeof(addr)); memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET; addr.sin_family = AF_INET;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment