From: Rosen Penev Date: Wed, 24 Jun 2020 23:48:54 +0000 (-0700) Subject: procd: fix compilation with uClibc-ng X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=aed7fb3cf28021f555e938fa1226072db745ea22;p=project%2Fprocd.git procd: fix compilation with uClibc-ng _GNU_SOURCE was missing. Also defined two macros unavailable with uClibc-ng. Signed-off-by: Rosen Penev [resolved conflict in jail.c] Signed-off-by: Petr Štetiar --- diff --git a/jail/console.c b/jail/console.c index eacb2fa..588d241 100644 --- a/jail/console.c +++ b/jail/console.c @@ -11,6 +11,10 @@ * GNU General Public License for more details. */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + #include #include #include diff --git a/jail/jail.c b/jail/jail.c index 645c836..8a2d890 100644 --- a/jail/jail.c +++ b/jail/jail.c @@ -46,6 +46,10 @@ #include #include +#ifndef CLONE_NEWCGROUP +#define CLONE_NEWCGROUP 0x02000000 +#endif + #define STACK_SIZE (1024 * 1024) #define OPT_ARGS "S:C:n:h:r:w:d:psulocU:G:NR:fFO:T:EyJ:" diff --git a/trace/trace.c b/trace/trace.c index 78b99dd..93554f7 100644 --- a/trace/trace.c +++ b/trace/trace.c @@ -33,6 +33,11 @@ #define PTRACE_EVENT_STOP 128 #endif +#ifndef PTRACE_EVENT_SECCOMP +/* undefined with uClibc-ng */ +#define PTRACE_EVENT_SECCOMP 7 +#endif + #include #include #include