patches/scorched3d-01-securid.diff
changeset 2595 baa193927807
parent 928 731ebce2c195
child 8065 f2a1e4da8aed
--- a/patches/scorched3d-01-securid.diff	Fri May 07 16:07:52 2010 +0000
+++ b/patches/scorched3d-01-securid.diff	Sat May 08 11:24:36 2010 +0000
@@ -1,39 +1,38 @@
---- scorched/src/net/SecureID.cpp.orig	2008-02-10 19:32:09.798176874 +0530
-+++ scorched/src/net/SecureID.cpp	2008-02-10 19:49:01.902395952 +0530
-@@ -36,6 +36,11 @@
- 
- #else
- 
-+#if defined(__sun) || defined (__sun__)
-+#include <sys/sockio.h>
-+#endif
-+
-+#include <unistd.h>
- #include <sys/ioctl.h>
- #include <net/if.h>
- 
-@@ -73,7 +78,12 @@
- 	if_freenameindex(NameList); //free the memory
- 
- 	strcpy (dev.ifr_name, InterfaceName.c_str()); //select from the name
-+
-+#if defined(__sun) || defined (__sun__)
-+	if (ioctl(sock, SIOCGENADDR, &dev) < 0) //get the interface data
-+#else
- 	if (ioctl(sock, SIOCGIFHWADDR, &dev) < 0) //get the interface data
-+#endif
- 	{
- 		close(sock);
- 		return ""; //cannot list the interfaces
-@@ -81,7 +91,11 @@
- 
-     for (int i=0; i<6; i++)
-     {
-+#if defined(__sun) || defined (__sun__)
-+	Key += (((unsigned int)dev.ifr_ifru.ifru_enaddr[i])&255);
-+#else
-         Key += (((unsigned int)dev.ifr_hwaddr.sa_data[i])&255);
-+#endif
-         if (i != 5) Key += ':';
-     }
- 	close(sock);
+--- scorched/src/client/client/SecureID.cpp	Sun Mar  2 19:47:36 2008
++++ scorched-patch/src/client/client/SecureID.cpp	Sat May  8 12:28:54 2010
+@@ -38,6 +38,11 @@
+ 
+ #include <sys/ioctl.h>
+ #include <net/if.h>
++#if defined(__sun) || defined (__sun__)
++#include <sys/sockio.h>
++#include <unistd.h>
++#include <stropts.h>
++#endif
+ 
+ std::string SecureID::GetPrivateKey(void)
+ {
+@@ -73,7 +78,11 @@
+ 	if_freenameindex(NameList); //free the memory
+ 
+ 	strcpy (dev.ifr_name, InterfaceName.c_str()); //select from the name
++#if defined(__sun) || defined (__sun__)
++	if (ioctl(sock, SIOCGENADDR, &dev) < 0) //get the interface data
++#else
+ 	if (ioctl(sock, SIOCGIFHWADDR, &dev) < 0) //get the interface data
++#endif
+ 	{
+ 		close(sock);
+ 		return ""; //cannot list the interfaces
+@@ -81,7 +90,11 @@
+ 
+     for (int i=0; i<6; i++)
+     {
++#if defined(__sun) || defined (__sun__)
++	Key += (((unsigned int)dev.ifr_ifru.ifru_enaddr[i])&255);
++#else
+         Key += (((unsigned int)dev.ifr_hwaddr.sa_data[i])&255);
++#endif
+         if (i != 5) Key += ':';
+     }
+ 	close(sock);