@ferhue You are distributing (in ROOT 6.40 and older, as of 2026.09.25) a very old, outdated “cfortran.h” file (valid for gfortran versions up to and including 7.x), which is additionally broken (in ROOT 6.38 and newer) by the “Modernize deprecated C header includes” patch.
Please take the newest “cfortran.h” file, provided by the newest CERNLIB distribution.
Do NOT “modernize” it. It is, and it should remain, an ordinary C include file.
After a quick look at the current “cfitsio/cfortran.h” file, it seems to me that it is also fine (maybe even better, as it tries to support the C23 standard too).