[libc-commits] [libc] [libc][sched] Fix cpuset includes (PR #126303)
Krishna Pandey via libc-commits
libc-commits at lists.llvm.org
Tue Feb 11 09:20:23 PST 2025
================
@@ -10,7 +10,7 @@
#define LLVM_LIBC_SRC_SCHED_SCHED_GETPARAM_H
#include "src/__support/macros/config.h"
-#include <sched.h>
+#include "hdr/types/cpu_set_t.h"
----------------
krishna2803 wrote:
```FAILED: libc/test/src/sched/CMakeFiles/libc.test.src.sched.get_priority_test.__build__.dir/get_priority_test.cpp.o
/home/krishna/OpenSource/llvm-project/build/./bin/clang++ --target=x86_64-unknown-linux-gnu -DLIBC_NAMESPACE=__llvm_libc_21_0_0_git -D_DEBUG -I/home/krishna/OpenSource/llvm-project/libc -isystem /home/krishna/OpenSource/llvm-project/build/runtimes/runtimes-bins/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -fpie -ffixed-point -Wextra-semi -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -std=gnu++17 -MD -MT libc/test/src/sched/CMakeFiles/libc.test.src.sched.get_priority_test.__build__.dir/get_priority_test.cpp.o -MF libc/test/src/sched/CMakeFiles/libc.test.src.sched.get_priority_test.__build__.dir/get_priority_test.cpp.o.d -o libc/test/src/sched/CMakeFiles/libc.test.src.sched.get_priority_test.__build__.dir/get_priority_test.cpp.o -c /home/krishna/OpenSource/llvm-project/libc/test/src/sched/get_priority_test.cpp
/home/krishna/OpenSource/llvm-project/libc/test/src/sched/get_priority_test.cpp:66:18: error: use of undeclared identifier 'SCHED_OTHER'
66 | int policy = SCHED_OTHER;
| ^
/home/krishna/OpenSource/llvm-project/libc/test/src/sched/get_priority_test.cpp:80:18: error: use of undeclared identifier 'SCHED_FIFO'
80 | int policy = SCHED_FIFO;
| ^
/home/krishna/OpenSource/llvm-project/libc/test/src/sched/get_priority_test.cpp:94:18: error: use of undeclared identifier 'SCHED_RR'
94 | int policy = SCHED_RR;
| ^
3 errors generated.```
and.. i guess we need to create proxy headers for `sched-macros.h` as well..
https://github.com/llvm/llvm-project/pull/126303
More information about the libc-commits
mailing list