I'm having an issue with the new 'prlimit'
additions to 1.0.40. One of my
targets runs an older kernel that predates the prlimit64 syscall. I sent in
patch that guards around that code, though it would still be defined in
headers and probably still cause me issues.
My other target uses kernel 2.6.36.4, which should include the syscall, but
I get an error the same as this github issue.
https://github.com/util-linux/util-linux/commit/01e94325e676f36b364032a6f5a…
Also, when I try to compile sample program that target:
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <stddef.h>
int main ()
{
int ret;
ret = prlimit(0, RLIMIT_AS, NULL, NULL);
if (ret != 0) {
return 1;
};
return 0;
}
I get error
prlimit.c:10:11: warning: implicit declaration of function ‘prlimit’; did
you mean ‘setrlimit’? [-Wimplicit-function-declaration]
10 | ret = prlimit(0, RLIMIT_AS, NULL, NULL);
| ^~~~~~~
| setrlimit
on unpatched uclibc-ng like symbols still aren't being visible.
Did you forget the preprocessor directive -D_GNU_SOURCE?
Which kernel version predates the prlimit64 syscall you are using?
best regards
Waldemar