From a3287a5b1a4c5e1028026bf814e1b94ef2fc09dd Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 20 Jan 2013 13:10:01 -0500 Subject: [PATCH] COMMON: Fix compilation with boost filesystem v2 --- src/common/filelist.cpp | 5 ++++- src/common/filepath.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/common/filelist.cpp b/src/common/filelist.cpp index 962c0ec2a2..28f506963c 100644 --- a/src/common/filelist.cpp +++ b/src/common/filelist.cpp @@ -29,6 +29,7 @@ #include #include +#include #include "common/filelist.h" #include "common/file.h" @@ -45,7 +46,9 @@ using boost::to_lower_copy; using boost::equals; using boost::iequals; -#if BOOST_FILESYSTEM_VERSION == 3 +#if ((((BOOST_VERSION / 100000) == 1) && (((BOOST_VERSION / 100) % 1000) < 44)) || BOOST_FILESYSTEM_VERSION == 2) +#define generic_string() string() +#elif BOOST_FILESYSTEM_VERSION == 3 #define stem() stem().string() #endif diff --git a/src/common/filepath.cpp b/src/common/filepath.cpp index be1b38fcca..86b3ce0325 100644 --- a/src/common/filepath.cpp +++ b/src/common/filepath.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include "common/filepath.h" #include "common/util.h" @@ -48,7 +49,9 @@ using boost::filesystem::directory_iterator; using boost::equals; using boost::iequals; -#if BOOST_FILESYSTEM_VERSION == 3 +#if ((((BOOST_VERSION / 100000) == 1) && (((BOOST_VERSION / 100) % 1000) < 44)) || BOOST_FILESYSTEM_VERSION == 2) +#define generic_string() string() +#elif BOOST_FILESYSTEM_VERSION == 3 #define stem() stem().string() #define extension() extension().string() #define filename() filename().string()