summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2022-04-05 14:47:14 +0100
committerSimon McVittie <smcv@collabora.com>2022-04-05 14:48:23 +0100
commit7e62e8dafe19b9b7c7c77a85a664eb42bd2ffee7 (patch)
tree6e795bdb7fc92e61120c9b3a3c1fa1d9bf00668b
parent34a8c8bc870783611bc1b10f504fcf00f9eaa08e (diff)
downloadbubblewrap-7e62e8dafe19b9b7c7c77a85a664eb42bd2ffee7.tar.gz
Allow building on old glibc without PR_SET_CHILD_SUBREAPER defined
Signed-off-by: Simon McVittie <smcv@collabora.com>
-rw-r--r--tests/try-syscall.c4
-rw-r--r--utils.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/try-syscall.c b/tests/try-syscall.c
index df35054..6e389de 100644
--- a/tests/try-syscall.c
+++ b/tests/try-syscall.c
@@ -71,6 +71,10 @@
*/
#define WRONG_POINTER ((char *) 1)
+#ifndef PR_GET_CHILD_SUBREAPER
+#define PR_GET_CHILD_SUBREAPER 37
+#endif
+
int
main (int argc, char **argv)
{
diff --git a/utils.h b/utils.h
index 55a9585..37d8c7c 100644
--- a/utils.h
+++ b/utils.h
@@ -48,6 +48,10 @@ typedef int bool;
#define PIPE_READ_END 0
#define PIPE_WRITE_END 1
+#ifndef PR_SET_CHILD_SUBREAPER
+#define PR_SET_CHILD_SUBREAPER 36
+#endif
+
void warn (const char *format,
...) __attribute__((format (printf, 1, 2)));
void die_with_error (const char *format,