From 59c9d39865e08601ff602f4c408d8d3fb9ac344e Mon Sep 17 00:00:00 2001 From: Larry Gritz Date: Fri, 26 Jun 2026 14:44:17 -0400 Subject: [PATCH] build: fix certain clang varieties warning about giflib headers Assisted-by: Claude Code / sonnet-4.6 Signed-off-by: Larry Gritz --- src/gif.imageio/gifinput.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gif.imageio/gifinput.cpp b/src/gif.imageio/gifinput.cpp index 3e01dd1bad..784cdf850a 100644 --- a/src/gif.imageio/gifinput.cpp +++ b/src/gif.imageio/gifinput.cpp @@ -6,7 +6,13 @@ #include #include +// Prevent a conflict between gif_lib.h's reallocarray declaration (no +// exception spec) and glibc's stdlib.h version (noexcept/__THROW). Clang +// treats the mismatch as a hard error in C++ mode. We rename it away here +// since gifinput.cpp never calls reallocarray directly. +#define reallocarray giflib_reallocarray_private_ #include +#undef reallocarray #include #include