From 373ccff7e47ec56d3ec2950a830ef32f8a5318f2 Mon Sep 17 00:00:00 2001 From: fgenesis Date: Thu, 14 Nov 2013 20:37:50 +0100 Subject: [PATCH] Fix build on linux --- Aquaria/ModDownloader.cpp | 14 +++++--------- BBGE/Base.cpp | 4 +++- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Aquaria/ModDownloader.cpp b/Aquaria/ModDownloader.cpp index 81936f1..cd2fe4c 100644 --- a/Aquaria/ModDownloader.cpp +++ b/Aquaria/ModDownloader.cpp @@ -8,10 +8,6 @@ #include "Network.h" #include "tinyxml.h" -#ifdef BBGE_BUILD_UNIX -#include -#endif - using Network::NetEvent; using Network::NE_ABORT; using Network::NE_FINISH; @@ -146,7 +142,7 @@ void ModDL::GetModlist(const std::string& url, bool allowChaining, bool first) { if(first) knownServers.clear(); - + // Prevent recursion, self-linking, or cycle linking. // In theory, this allows setting up a server network // where each server links to any servers it knows, @@ -174,7 +170,7 @@ void ModDL::GetModlist(const std::string& url, bool allowChaining, bool first) std::ostringstream os; os << "Fetching mods list [" << url << "], chain: " << allowChaining; debugLog(os.str()); - + std::string localName = remoteToLocalName(url); debugLog("... to: " + localName); @@ -230,7 +226,7 @@ void ModDL::NotifyModlist(ModlistRequest *rq, NetEvent ev, size_t recvd, size_t } return; } - + if(scr) { scr->globeIcon->alpha.stop(); @@ -279,7 +275,7 @@ bool ModDL::ParseModXML(const std::string& fn, bool allowChaining) //-- optional tag, if not given, "mod" is assumed. Can be "mod", "patch", or "weblink". // if type=="weblink", will be opened with the default web browser. - + ... @@ -527,7 +523,7 @@ void ModDL::NotifyMod(ModRequest *rq, NetEvent ev, size_t recvd, size_t total) // Dir already exists, just remount everything vfs.Reload(); } - else if(!dsq->mountModPackage(archiveFile)) + else if(!dsq->mountModPackage(archiveFile)) { // make package readable (so that the icon can be shown) // But only if it wasn't mounted before! diff --git a/BBGE/Base.cpp b/BBGE/Base.cpp index fc045ee..65b98f7 100644 --- a/BBGE/Base.cpp +++ b/BBGE/Base.cpp @@ -33,6 +33,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #if defined(BBGE_BUILD_UNIX) #include #include + #include + #include #endif #if defined(BBGE_BUILD_MACOSX) @@ -105,7 +107,7 @@ Direction getNextDirClockwise(Direction dir) void sizePowerOf2Texture(int &v) { int p = 8, use=0; - do + do { use = 1 << p; p++;