[flang-commits] [flang] [flang] Fixed compiler build on glibc 2.17 systems after 3149c93. (PR #84873)

Leandro Lupori via flang-commits flang-commits at lists.llvm.org
Tue Mar 12 05:14:01 PDT 2024


luporl wrote:

The headers in glibc 2.17 define HUGE when __USE_SVID is defined, which depends on _SVID_SOURCE being defined.
By default, _BSD_SOURCE and _SVID_SOURCE are defined, but not when _POSIX_C_SOURCE is defined.

So, if you want to try, defining _POSIX_C_SOURCE for all platforms may fix this issue without needing to `#undef HUGE`, which would be a more permanent solution, that doesn't depend on the order of the includes. But as it changes what is exposed by the C runtime, it also has the potential to break something else.

https://github.com/llvm/llvm-project/pull/84873


More information about the flang-commits mailing list