Build fails with GDAL 3.12
Description
Changes with GDAL 3.12 causes build failure:
/opt/local/var/macports/build/orfeotoolbox-89905154/work/OTB-9.1.1/Modules/Core/Adapters/GdalAdapters/src/otbOGRFieldWrapper.cxx:101:65: error: no matching constructor for initialization of 'FieldDefn'
101 | otb::ogr::Field::Field(otb::ogr::Feature& feature, int index) : m_Definition(*feature.ogr().GetFieldDefnRef(index)), m_Feature(feature.sptr()), m_index(index)
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/var/macports/build/orfeotoolbox-89905154/work/OTB-9.1.1/Modules/Core/Adapters/GdalAdapters/include/otbOGRFieldWrapper.h:60:30: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'const OGRFieldDefn' to 'const FieldDefn' for 1st argument
60 | class OTBGdalAdapters_EXPORT FieldDefn
| ^~~~~~~~~
/opt/local/var/macports/build/orfeotoolbox-89905154/work/OTB-9.1.1/Modules/Core/Adapters/GdalAdapters/include/otbOGRFieldWrapper.h:60:30: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'const OGRFieldDefn' to 'FieldDefn' for 1st argument
60 | class OTBGdalAdapters_EXPORT FieldDefn
| ^~~~~~~~~
/opt/local/var/macports/build/orfeotoolbox-89905154/work/OTB-9.1.1/Modules/Core/Adapters/GdalAdapters/include/otbOGRFieldWrapper.h:63:3: note: candidate constructor not viable: 1st argument ('const OGRFieldDefn') would lose const qualifier
63 | FieldDefn(OGRFieldDefn& definition) : m_Definition(&definition)
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~
Steps to reproduce
Try to build with GDAL 3.12
Configuration information
OTB 9.1.1