bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Win7 Build Issue


From: Jason Baurick
Subject: Win7 Build Issue
Date: Thu, 12 Aug 2010 11:22:49 -0700

I ran into a small windows build issue, below is the patch which fixes it.  
Basically there are two issues, first FIOREAD is undefined.  The second is that 
the u_long type and size_t type are not always the same on windows, so I 
introduced a temporary u_long to pass into ioctlsocket.  I've also attached the 
patch.

diff --git a/src/socket.cpp b/src/socket.cpp
index 9fafb91..955c1e2 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -2853,9 +2853,13 @@ size_t  DCCPSocket::available()
                 error(errInput,(char *)"Error on retrieve the FIONREAD 
option.",socket_errno);
         }
 #else
-       if (ioctlsocket(so, FIOREAD, &readsize)){
+    u_long size = 0;
+
+       if (ioctlsocket(so, FIONREAD, &size)){
                error(errInput,(char *)"Error on retrieve the FIONREAD 
option.",socket_errno);
        }
+
+    readsize = size;
 #endif
        return readsize;
 }

- Jason
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

Attachment: win_build.patch
Description: win_build.patch


reply via email to

[Prev in Thread] Current Thread [Next in Thread]