cad/librecad: fix build on LLVM architectures
Last GCC fix broke Clang, the issue is already reported here https://github.com/LibreCAD/LibreCAD/issues/1130
Apply the upstream patch for GCC only on GCC architectures.
PR: 241863
Approved by: jhale (maintainer timeout), mentors (implicit approval)