upstream patch to fix build with new poppler
[packages/gdal.git] / gdal-poppler.patch
CommitLineData
ee43bca4
JP
1From 2d789902ffb48251ec2ff632320d78ee088c2c5f Mon Sep 17 00:00:00 2001
2From: Even Rouault <even.rouault@spatialys.com>
3Date: Sat, 5 May 2018 22:18:37 +0200
4Subject: [PATCH] Fix build with recent Poppler (0.64) (fix #573)
5
6---
7 gdal/frmts/pdf/pdfobject.cpp | 5 +++++
8 1 file changed, 5 insertions(+)
9
10diff --git a/gdal/frmts/pdf/pdfobject.cpp b/gdal/frmts/pdf/pdfobject.cpp
11index ae734a74e4c..5eab5dd1546 100644
12--- a/gdal/frmts/pdf/pdfobject.cpp
13+++ b/gdal/frmts/pdf/pdfobject.cpp
14@@ -1055,7 +1055,12 @@ const CPLString& GDALPDFObjectPoppler::GetString()
15 {
16 if (GetType() == PDFObjectType_String)
17 {
18+#ifdef POPPLER_0_58_OR_LATER
19+ // At least available since poppler 0.41
20+ const GooString* gooString = m_po->getString();
21+#else
22 GooString* gooString = m_po->getString();
23+#endif
24 return (osStr = GDALPDFGetUTF8StringFromBytes(reinterpret_cast<const GByte*>(gooString->getCString()),
25 static_cast<int>(gooString->getLength())));
26 }
This page took 0.092 seconds and 4 git commands to generate.