|
From: <gb...@us...> - 2009-06-13 13:14:40
|
Revision: 425
http://gearbox.svn.sourceforge.net/gearbox/?rev=425&view=rev
Author: gbiggs
Date: 2009-06-13 12:30:47 +0000 (Sat, 13 Jun 2009)
Log Message:
-----------
Fixed windows includes
Modified Paths:
--------------
gearbox/trunk/src/flexiport/udpport.cpp
gearbox/trunk/src/flexiport/udpport.h
Modified: gearbox/trunk/src/flexiport/udpport.cpp
===================================================================
--- gearbox/trunk/src/flexiport/udpport.cpp 2009-06-13 12:25:55 UTC (rev 424)
+++ gearbox/trunk/src/flexiport/udpport.cpp 2009-06-13 12:30:47 UTC (rev 425)
@@ -33,7 +33,6 @@
#include <netdb.h>
#endif
#include <sys/types.h>
-#include <arpa/inet.h>
#include <fcntl.h>
#include <string.h>
#include <sstream>
@@ -50,6 +49,7 @@
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netdb.h>
+ #include <arpa/inet.h>
#endif
#if !defined (HOST_NAME_MAX)
@@ -113,7 +113,11 @@
{
int broadcastFlag = 1;
if (setsockopt (sock, SOL_SOCKET, SO_BROADCAST,
+#if defined (WIN32)
+ reinterpret_cast<const char*> (&broadcastFlag), sizeof (broadcastFlag)) < 0)
+#else
&broadcastFlag, sizeof (broadcastFlag)) < 0)
+#endif
{
stringstream ss;
ss << __func__ << "() setsockopt() error: (" << ErrNo () << ") " <<
Modified: gearbox/trunk/src/flexiport/udpport.h
===================================================================
--- gearbox/trunk/src/flexiport/udpport.h 2009-06-13 12:25:55 UTC (rev 424)
+++ gearbox/trunk/src/flexiport/udpport.h 2009-06-13 12:30:47 UTC (rev 425)
@@ -33,7 +33,9 @@
#include <map>
#include <string>
-#include <netinet/in.h>
+#if !defined (WIN32)
+ #include <netinet/in.h>
+#endif
/** @ingroup gbx_library_flexiport
@{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|