Created
March 15, 2013 10:36
-
-
Save phuesler/5168910 to your computer and use it in GitHub Desktop.
Changes to make the unity master server compile on a EC2 Ubuntu instance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Makefile b/Makefile | |
index d8009c7..a74a6ee 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -3,7 +3,7 @@ | |
CC=g++ | |
DEFINES = -DUNITY_MASTERSERVER | |
-CFLAGS=-Wall -lpthread $(DEFINES) | |
+CFLAGS=-Wall -pthread $(DEFINES) | |
DEBUG=-ggdb | |
INCLUDE = . | |
PROGRAMNAME = MasterServer | |
diff --git a/MasterServer.cpp b/MasterServer.cpp | |
index 6c21a45..8b8f511 100755 | |
--- a/MasterServer.cpp | |
+++ b/MasterServer.cpp | |
@@ -20,6 +20,7 @@ | |
#include <windows.h> | |
#else | |
#include <stdlib.h> | |
+#include <unistd.h> | |
#endif | |
LightweightDatabaseServer databaseServer; | |
diff --git a/RakNet/Sources/DS_BinarySearchTree.h b/RakNet/Sources/DS_BinarySearchTree.h | |
index b63fc98..c7db2b5 100644 | |
--- a/RakNet/Sources/DS_BinarySearchTree.h | |
+++ b/RakNet/Sources/DS_BinarySearchTree.h | |
@@ -166,12 +166,12 @@ namespace DataStructures | |
if ( current->left == 0 ) | |
left_height = 0; | |
else | |
- left_height = Height( current->left ); | |
+ left_height = this->Height( current->left ); | |
if ( current->right == 0 ) | |
right_height = 0; | |
else | |
- right_height = Height( current->right ); | |
+ right_height = this->Height( current->right ); | |
if ( right_height - left_height == 2 ) | |
{ | |
@@ -199,7 +199,7 @@ namespace DataStructures | |
if ( current == this->root ) | |
break; | |
- current = FindParent( *( current->item ) ); | |
+ current = this->FindParent( *( current->item ) ); | |
} | |
} | |
@@ -226,7 +226,7 @@ namespace DataStructures | |
if ( A == 0 ) | |
return false; | |
- return Height( A->right ) > Height( A->left ); | |
+ return this->Height( A->right ) > this->Height( A->left ); | |
} | |
template <class BinarySearchTreeType> | |
@@ -235,7 +235,7 @@ namespace DataStructures | |
if ( A == 0 ) | |
return false; | |
- return Height( A->left ) > Height( A->right ); | |
+ return this->Height( A->left ) > this->Height( A->right ); | |
} | |
template <class BinarySearchTreeType> | |
@@ -272,8 +272,8 @@ namespace DataStructures | |
*/ | |
- B = FindParent( *( C->item ) ); | |
- A = FindParent( *( B->item ) ); | |
+ B = this->FindParent( *( C->item ) ); | |
+ A = this->FindParent( *( B->item ) ); | |
D = C->right; | |
if ( A ) | |
@@ -336,8 +336,8 @@ namespace DataStructures | |
*/ | |
- B = FindParent( *( C->item ) ); | |
- A = FindParent( *( B->item ) ); | |
+ B = this->FindParent( *( C->item ) ); | |
+ A = this->FindParent( *( B->item ) ); | |
D = C->left; | |
if ( A ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment