Skip to content

Commit

Permalink
PDF: fix build with PoDoFo >= 0.10 with C++20 compilation (fixes #9875)
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault authored and github-actions[bot] committed May 8, 2024
1 parent b44e2ab commit a82046d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions frmts/pdf/pdfsdk_headers.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@
#endif

#ifdef USE_HACK_BECAUSE_PdfInputStream_constructor_is_not_exported_in_podofo_0_11
// If we <sstream> is included after our below #define private public errors out
// with an error like:
// /usr/include/c++/13.2.1/sstream:457:7: error: 'struct std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>::__xfer_bufptrs' redeclared with different access
// 457 | struct __xfer_bufptrs
// so include it before, as otherwise it would get indirectly included by
// PdfDate.h, which includes <chrono>, which includes <sstream>
#include <sstream>
// Ugly! PfdObjectStream::GetParent() is private but we need it...
#define private public
#endif
Expand Down

0 comments on commit a82046d

Please sign in to comment.