From 0c0dabfcc775d535f7d1f9c8b14c5e26971d6cf4 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 22 Mar 2023 22:23:48 -0700 Subject: [PATCH] geotag: add GCC7 support Signed-off-by: Rosen Penev --- samples/geotag.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/samples/geotag.cpp b/samples/geotag.cpp index e50023f5..b28ab02b 100644 --- a/samples/geotag.cpp +++ b/samples/geotag.cpp @@ -8,9 +8,16 @@ #include #include -#include #include +#if __has_include() +#include +namespace fs = std::filesystem; +#else +#include +namespace fs = std::experimental::filesystem; +#endif + using namespace std; #ifdef _WIN32 @@ -795,7 +802,7 @@ int main(int argc, const char* argv[]) { printf("%s %s ", arg, types[type]); if (type == typeImage) { time_t t = readImageTime(std::string(arg)); - auto p = std::filesystem::absolute(std::filesystem::path(arg)); + auto p = fs::absolute(fs::path(arg)); std::string path = p.string(); if (t && !path.empty()) { if (options.verbose)