From 7e62e8dafe19b9b7c7c77a85a664eb42bd2ffee7 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 5 Apr 2022 14:47:14 +0100 Subject: Allow building on old glibc without PR_SET_CHILD_SUBREAPER defined Signed-off-by: Simon McVittie --- tests/try-syscall.c | 4 ++++ utils.h | 4 ++++ 2 files changed, 8 insertions(+) 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, -- cgit v1.2.1