This is extremely similar to getcpu, but was available in a much earlier glibc, so a lot more code depends on it. Do a similar implementation. We can only have a simple smoke test as the only documented failure mode in the man page is running on a kernel that does not support the system call, and such kernels (<2.6) are ancient at this point.
LLVM libc ========= This directory and its subdirectories contain source code for llvm-libc, a retargetable implementation of the C standard library. LLVM is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.