Commit d7e25d85 authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: compile for both windows and unix, I hope...

parent df2b4813
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#define vtkCloseSocketMacro(sock) (close(sock)) #define vtkCloseSocketMacro(sock) (close(sock))
#endif #endif
vtkCxxRevisionMacro(vtkSocketCommunicator, "1.47"); vtkCxxRevisionMacro(vtkSocketCommunicator, "1.48");
vtkStandardNewMacro(vtkSocketCommunicator); vtkStandardNewMacro(vtkSocketCommunicator);
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
...@@ -312,7 +312,11 @@ int vtkSocketCommunicator::GetPort(int sock) ...@@ -312,7 +312,11 @@ int vtkSocketCommunicator::GetPort(int sock)
{ {
struct sockaddr_in sockinfo; struct sockaddr_in sockinfo;
memset(&sockinfo, 0, sizeof(sockinfo)); memset(&sockinfo, 0, sizeof(sockinfo));
#if defined(_WIN32) && !defined(__CYGWIN__)
int sizebuf = sizeof(sockinfo); int sizebuf = sizeof(sockinfo);
#else
socklen_t sizebuf = sizeof(sockinfo);
#endif
if(getsockname(sock, (sockaddr*)&sockinfo, &sizebuf) != 0) if(getsockname(sock, (sockaddr*)&sockinfo, &sizebuf) != 0)
{ {
vtkErrorMacro("No port found for socket " << sock); vtkErrorMacro("No port found for socket " << sock);
......
Supports Markdown
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