<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/126287>126287</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[libc][sched] Fix includes of `libc/include/llvm-libc-types/sched.h`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
libc
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
krishna2803
</td>
</tr>
</table>
<pre>
The files using `cpu_set_t` import it incorrectly. For example:
```cpp
// libc/src/sched/linux/sched_getcpucount.cpp
...
#include "src/sched/sched_getcpucount.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
#include <sched.h>
#include <stddef.h>
//...
```
should include
`"libc/include/llvm-libc/types/cpu_set_t.h"` instead of `<sched.h>`. Currently, this results in the type being imported from the local libc (likely glibc) that creates issues.
This should be fixed before #124642
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyEU8turDoQ_BqzaQV5mucsWORx-YLsR8Y04BuDkR_RzN9fmceNopzoSKMRpql2dVW1cE6NC1HDihdWvCUi-MnY5sMqNy0Ca54lnekfzftEMChNDoJTywis5HINN0f-5lnJQc2rsR6UB7VIYy1Jrx8ptMYC3cW8amLZM-PPrOT7T65rPGLLsAWtOsmwdXb7lxP1DFutlnA_z7eRvFyDNGHx6Y5N03TrkKlF6tATMMTvHX4iJ4YYQX_G3W4urHEOhq0082yW_wF_-XoW0hq3wZZBjb_ck71ujNKJZf_8LPm-p-GrFoU5Rjw12zu6yQTdwwE9bik5QzxkPCvYav05Px1v_WOljeFp204yerc4T6IHM0Rbv7MseQqvwVpavH4wfAU_KQeWXNDegVrATwSxNXQUc7HngHoYrJm3ojZS6M1hYFhr9UH6AeNO6gp-Eh6kJeHJgXIukEv3kd7jRcesXQzfneLDYGz0ILtgXuYISd9k_TW7ioSaS5XV1yKvc55MTSn7C3JeXUqsepkJzPKqIjFcsORV3eWJapBjwZFXlyvnOU9LURVFX9RVXtCVlzXLOc1C6TSqmBo7Jhu_5oIl1lWiRUfabXtzKo9xg2yzqd6F0bGca-W8--rgldfbrm2A4o0VL3tYizdo1f001R1e_G7o02nn6VXJk2B1M3m_urhqW35G5afQpdLMB_ZssVrzL8mY3F1zhu0x1meD_wUAAP__4FFIsQ">