From e521a5094be3be4f8657a2253958b0d752616479 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 27 Feb 2024 12:50:37 +0100 Subject: [PATCH 1/2] openjpeg.h: make sure to include opj_config.h (fixes #1514) It was previously included by openjpeg.h --- src/lib/openjp2/openjpeg.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/openjp2/openjpeg.h b/src/lib/openjp2/openjpeg.h index a421143a5..67d168bb5 100644 --- a/src/lib/openjp2/openjpeg.h +++ b/src/lib/openjp2/openjpeg.h @@ -138,6 +138,8 @@ typedef int64_t OPJ_OFF_T; /* 64-bit file offset type */ #include typedef size_t OPJ_SIZE_T; +#include "opj_config.h" + /* Avoid compile-time warning because parameter is not used */ #define OPJ_ARG_NOT_USED(x) (void)(x) From f19c21309ee996a752e35ff299cb2d2a6fd8b6cd Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 27 Feb 2024 15:54:37 +0100 Subject: [PATCH 2/2] opj_config.h.cmake.in: add inclusion guard --- src/lib/openjp2/opj_config.h.cmake.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/openjp2/opj_config.h.cmake.in b/src/lib/openjp2/opj_config.h.cmake.in index 50015fb9a..64884b652 100644 --- a/src/lib/openjp2/opj_config.h.cmake.in +++ b/src/lib/openjp2/opj_config.h.cmake.in @@ -1,3 +1,6 @@ +#ifndef OPJ_CONFIG_H_INCLUDED +#define OPJ_CONFIG_H_INCLUDED + /* create opj_config.h for CMake */ /*--------------------------------------------------------------------------*/ @@ -7,3 +10,5 @@ #define OPJ_VERSION_MAJOR @OPENJPEG_VERSION_MAJOR@ #define OPJ_VERSION_MINOR @OPENJPEG_VERSION_MINOR@ #define OPJ_VERSION_BUILD @OPENJPEG_VERSION_BUILD@ + +#endif