procd: fix compilation with uClibc-ng
authorRosen Penev <rosenp@gmail.com>
Wed, 24 Jun 2020 23:48:54 +0000 (16:48 -0700)
committerPetr Štetiar <ynezz@true.cz>
Sat, 11 Jul 2020 13:13:15 +0000 (15:13 +0200)
_GNU_SOURCE was missing.

Also defined two macros unavailable with uClibc-ng.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[resolved conflict in jail.c]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
jail/console.c
jail/jail.c
trace/trace.c

index eacb2fa9649199cc90c1fc37bdc25c3d5db2b3d5..588d24114bc499117a720b9be48161f2328e4cbe 100644 (file)
  * GNU General Public License for more details.
  */
 
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
 #include <stdlib.h>
 #include <fcntl.h>
 #include <libubox/ustream.h>
index 645c836f0eba61b17f1badb055b76fb3374b90f0..8a2d890dcab7a56fdd93920c6a7950a1745b432a 100644 (file)
 #include <libubox/uloop.h>
 #include <libubus.h>
 
+#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:"
 
index 78b99dd053d7b91bd86ac9d7efc7a706596e0caa..93554f73e922d605c4313812d3b7172c6298f3db 100644 (file)
 #define PTRACE_EVENT_STOP 128
 #endif
 
+#ifndef PTRACE_EVENT_SECCOMP
+/* undefined with uClibc-ng */
+#define PTRACE_EVENT_SECCOMP 7
+#endif
+
 #include <libubox/ulog.h>
 #include <libubox/uloop.h>
 #include <libubox/blobmsg.h>