2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

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: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov
2014-03-14 18:38:00 +04:00
committed by Pavel Emelyanov
parent ff50ef3b21
commit 5f433a6e81
2 changed files with 4 additions and 2 deletions

View File

@@ -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;

View File

@@ -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;