Fix build with gcc4.2

This commit is contained in:
Kirill Ponomarev
2007-05-26 21:01:13 +00:00
parent d5f9a73cc0
commit 43adabc85f
3 changed files with 37 additions and 4 deletions

View File

@@ -0,0 +1,23 @@
$FreeBSD$
--- NetSocket.cpp.orig
+++ NetSocket.cpp
@@ -45,7 +45,7 @@
namespace CodeWorker {
bool socketReaderCBK(ScpStream& theStream, void* pData) {
char tcBuffer[2048];
- int hSocket = (int) pData;
+ int hSocket = (intptr_t) pData;
int iLength = recv(hSocket, tcBuffer, 2047, 0);
if (iLength <= 0) return false;
theStream.writeBinaryData(tcBuffer, iLength);
@@ -53,7 +53,7 @@
}
bool socketWriterCBK(ScpStream& theStream, void* pData) {
- int hSocket = (int) pData;
+ int hSocket = (intptr_t) pData;
int iLength = theStream.size();
if (iLength <= 0) return false;
return NetSocket::sendToSocket(hSocket, theStream.readBuffer(), iLength);