openexr
openexr copied to clipboard
exrmetrics: compilation error
While updating the openexr package in pkgsrc, I noticed the following compilation error on NetBSD-10.99.12/amd64 with gcc 12.4.0:
/scratch/graphics/openexr/work/openexr-3.3.0/src/bin/exrmetrics/exrmetrics.cpp: In function 'void exrmetrics(const char*, const char*, int, Imf_3_3::Compression, float, int)':
/scratch/graphics/openexr/work/openexr-3.3.0/src/bin/exrmetrics/exrmetrics.cpp:486:10: error: 'isinf' was not declared in this scope; did you mean 'std::isinf'?
486 | if (!isinf (level) && level >= -1)
| ^~~~~
| std::isinf
In file included from /usr/pkg/include/Imath/ImathMath.h:16,
from /usr/pkg/include/Imath/ImathVec.h:17,
from /usr/pkg/include/Imath/ImathBox.h:16,
from /scratch/graphics/openexr/work/openexr-3.3.0/src/lib/OpenEXR/ImfFrameBuffer.h:21,
from /scratch/graphics/openexr/work/openexr-3.3.0/src/lib/OpenEXR/ImfDeepFrameBuffer.h:11,
from /scratch/graphics/openexr/work/openexr-3.3.0/src/bin/exrmetrics/exrmetrics.cpp:10:
/usr/include/g++/cmath:605:5: note: 'std::isinf' declared here
605 | isinf(_Tp __x)
| ^~~~~
Following the compiler's suggestion fixes the build:
--- src/bin/exrmetrics/exrmetrics.cpp.orig 2024-09-26 23:34:32.000000000 +0000
+++ src/bin/exrmetrics/exrmetrics.cpp
@@ -482,7 +482,7 @@ exrmetrics (
}
else { compression = outHeader.compression (); }
- if (!isinf (level) && level >= -1)
+ if (!std::isinf (level) && level >= -1)
{
switch (outHeader.compression ())
{
fix lgtm, thanks; do you want to submit or PR, or simply have us apply it?
I've made a patch but then noticed that I have to sign a contribution document, which is quite overkill for such an easy patch - so please just commit it yourself. Thank you!