| Issue |
124633
|
| Summary |
[libc] wrong function signature for setrlimit in generated sys/resource.h
|
| Labels |
good first issue,
libc
|
| Assignees |
|
| Reporter |
nickdesaulniers
|
Building clang itself against llvm-libc fails with:
```
llvm/lib/Support/Unix/Program.inc:161:3: error: no matching function for call to 'setrlimit'
161 | setrlimit(RLIMIT_RSS, &r);
| ^~~~~~~~~
/usr/include/sys/resource.h:23:5: note: candidate function not viable: requires 1 argument, but 2 were provided
23 | int setrlimit(const struct rlimit) __NOEXCEPT;
| ^ ~~~~~~~~~~~~~~~~~~~
```
This is because the generated header we produce has the function declaration of:
```c
int setrlimit(const struct rlimit) __NOEXCEPT;
```
but `man 3 setrlimit` says it should be
```c
int setrlimit(int resource, const struct rlimit *rlp);
```
libc/include/sys/resource.yaml should be fixed, a la 6045146014151a8f63a60612445de9ff6af47626 (cc @alexprabhat99)
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs