Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: IPAddress, SocketTCP, and SocketUDP not including cstring  (Read 5587 times)

0 Members and 1 Guest are viewing this topic.

dorkfish

  • Newbie
  • *
  • Posts: 38
    • View Profile
IPAddress, SocketTCP, and SocketUDP not including cstring
« on: December 29, 2008, 02:37:14 pm »
I don't know if anybody's noticed this, but  IPAddress.cpp, SocketTCP.cpp, and SocketUDP aren't including the cstring header, which all three require due to the string functions they use. I've included patches below in order to remedy this. (It's a simple edit, of course, but I've never made patches before and needed to learn how. :p) I would have included cstring in CSFML/src/SFML/Network/Internal.h, but saw that IPAddress.cpp doesn't include that, so I included cstring in each aforementioned files. I hope this was the right thing to do.

Patch: IPAddress.patch
Code: [Select]
--- src/sfml/CSFML/src/SFML/Network/IPAddress.cpp       2008-12-29 07:25:23.000000000 -0500
+++ ../sfml/CSFML/src/SFML/Network/IPAddress.cpp        2008-12-29 08:20:12.000000000 -0500
@@ -27,7 +27,7 @@
 ////////////////////////////////////////////////////////////
 #include <SFML/Network/IPAddress.h>
 #include <SFML/Network/IPAddress.hpp>
-
+#include <cstring>

 namespace
 {


Patch: SocketTCP.patch
Code: [Select]

--- src/sfml/CSFML/src/SFML/Network/SocketTCP.cpp       2008-12-29 07:25:23.000000000 -0500
+++ ../sfml/CSFML/src/SFML/Network/SocketTCP.cpp        2008-12-29 08:20:25.000000000 -0500
@@ -30,7 +30,7 @@
 #include <SFML/Network/IPAddress.hpp>
 #include <SFML/Network/Packet.hpp>
 #include <SFML/Internal.h>
-
+#include <cstring>

 // WARNING : this structure must always be the SAME as in Network/Packet.h
 struct sfPacket


Patch: SocketUDP.patch
Code: [Select]

--- src/sfml/CSFML/src/SFML/Network/SocketUDP.cpp       2008-12-29 08:25:35.000000000 -0500
+++ ../sfml/CSFML/src/SFML/Network/SocketUDP.cpp        2008-12-29 08:28:51.000000000 -0500
@@ -30,7 +30,7 @@
 #include <SFML/Network/IPAddress.hpp>
 #include <SFML/Network/Packet.hpp>
 #include <SFML/Internal.h>
-
+#include <cstring>

 // WARNING : this structure must always be the SAME as in Network/Packet.h
 struct sfPacket