From 4cd004d4d9582cd2c12e271c4305eca2d2106dd0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 25 Jul 2019 09:39:37 +0530 Subject: [PATCH] More ancient linux compiler support --- src/calibre/utils/podofo/utils.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/utils/podofo/utils.cpp b/src/calibre/utils/podofo/utils.cpp index 8e1a982f1c..da1272014e 100644 --- a/src/calibre/utils/podofo/utils.cpp +++ b/src/calibre/utils/podofo/utils.cpp @@ -15,7 +15,9 @@ pdf::podofo_set_exception(const PdfError &err) { if (msg == NULL) msg = err.what(); std::stringstream stream; stream << msg << "\n"; - for (const PdfErrorInfo &info : err.GetCallstack()) { + const TDequeErrorInfo &s = err.GetCallstack(); + for (TDequeErrorInfo::const_iterator it = s.begin(); it != s.end(); it++) { + const PdfErrorInfo &info = (*it); stream << "File: " << info.GetFilename() << "Line: " << info.GetLine() << " " << info.GetInformation() << "\n"; } PyErr_SetString(Error, stream.str().c_str());