summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2022-05-10 16:23:02 +0100
committerGitHub <noreply@github.com>2022-05-10 16:23:02 +0100
commit14d6a7f0dfa67c049cb95d6468d2a4097c21b84a (patch)
tree555f459a9fa0c337f01353d83e45dda2597905a9
parent3faa4c1ff2428faba26a5b06a2858c7c0b97cb11 (diff)
parent7e62e8dafe19b9b7c7c77a85a664eb42bd2ffee7 (diff)
downloadbubblewrap-14d6a7f0dfa67c049cb95d6468d2a4097c21b84a.tar.gz
Merge pull request #496 from smcv/missing-def
Allow building on old glibc without PR_SET_CHILD_SUBREAPER defined
-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,