Commit 5f433a6e authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

pstree: Define RLIM_NLIMITS

On PI machine we've got

 |   CC	   protobuf.o
 | pstree.c: In function ‘core_entry_alloc’:
 | pstree.c:36:10: error: ‘RLIM_NLIMITS’ undeclared (first use in this function)

due to old kernel headers. Note I've dropped off
BUG_ON here to localize all things in pstree code,
no need to sprinkle constants.
Reported-by: 's avatarPavel Emelyanov <xemul@parallels.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent ff50ef3b
......@@ -321,8 +321,6 @@ static int dump_task_rlimits(int pid, TaskRlimitsEntry *rls)
{
int res;
BUG_ON(rls->n_rlimits < RLIM_NLIMITS);
for (res = 0; res <rls->n_rlimits ; res++) {
struct rlimit lim;
......
......@@ -22,6 +22,10 @@ void core_entry_free(CoreEntry *core)
xfree(core);
}
#ifndef RLIM_NLIMITS
# define RLIM_NLIMITS 16
#endif
CoreEntry *core_entry_alloc(int th, int tsk)
{
size_t sz;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment