[Bug 265521] graphics/png: fix build with clang 15

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 30 Jul 2022 16:39:39 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265521

            Bug ID: 265521
           Summary: graphics/png: fix build with clang 15
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: portmgr@FreeBSD.org
          Reporter: dim@FreeBSD.org
             Flags: maintainer-feedback?(portmgr@FreeBSD.org)
          Assignee: portmgr@FreeBSD.org

During an exp-run for llvm 15 (see bug 265425), it turned out that graphics/png
 fails to build with clang 15, with an error:

    contrib/libtests/pngvalid.c:11662:4: error: call to undeclared function
'feenableexcept'; ISO C99 and later do not support implicit function
declarations [-Wimplicit-function-declaration]
       feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
       ^

This is because clang 15 introduced this new warning, and fenv.h only declares
feenableexcept() when compiling for C standards before C11.

The least disruptive way to solve this is to make the port build with
USE_CSTD=gnu89.

-- 
You are receiving this mail because:
You are the assignee for the bug.