<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/137321>137321</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [compiler-rt][sanitizer] sanitizer_platform_limits_posix.cpp uses struct termio, which will be removed in glibc-2.42
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          hhoffstaette
      </td>
    </tr>
</table>

<pre>
    Glibc-2.42 will remove <termio.h> and struct termio ([commit](https://sourceware.org/git/?p=glibc.git;a=commit;h=e04afb71771710cdc6025fe95908f5f17de7b72d)), which have been outdated since before Linux existed.
A test run in Gentoo's CI found a compilation error in LLVM, which can be found [here](https://bugs.gentoo.org/953040) and can be traced to [this location](https://github.com/llvm/llvm-project/blob/2d1b5a269b85c1a6174c1988f43acbb7bc1ba8f2/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp#L498C38-L498C51):
```
#if SANITIZER_GLIBC || SANITIZER_ANDROID
  unsigned struct_termio_sz = sizeof(struct termio);
#endif
```
While it will be some time until glibc-2.42 ships it seems prudent to get ahead of this, especially since the remaining use of `struct termio` seems like an oversight.

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUlN9v5CYQx_8a9mWUFQazth_8sD9uo0jpVbpWrdSXFeCxTYvBApzk8tdXeDfN5XQPPQkJaYCZYb6fGRmjGRxiS8SBiNNGLmn0oR1H3_cxSUwJN8p3X9t7a5S-Y9uSwbOxFgJO_gmB8GPCMBm_HQn_BNJ1EFNYdIKrGQiriThoP00mEXEirB5TmiPhe8LOhJ2jX4LGZxlw68NA2HkwKZ_w80z4achRt9nED5Lw080PP4yEn5CWsldVUVVFVVDd6R1losdGNLTuRV9UHVaqYh1hzbqO8DwaPcIonxAUogO_pE4m7CAap7Ot9wHh0bjlBfDFxITdltD9HhL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