summarylogtreecommitdiffstats
path: root/issue189.patch
blob: 6802909b6052aa86a61de8cfd2ff1d9784ba9973 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From d2b1a5d79476f1df2adc1465ac53eefb85a52f50 Mon Sep 17 00:00:00 2001
From: "Dmitry V. Levin" <ldv@strace.io>
Date: Wed, 21 Jul 2021 08:00:00 +0000
Subject: [PATCH] prctl: fix build using bionic libc

* src/prctl.c [__ANDROID__ && !PR_SET_VMA] (PR_SET_VMA): Define.
* NEWS: Mention this.

Resolves: https://github.com/strace/strace/issues/189
---
 NEWS        | 1 +
 src/prctl.c | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/src/prctl.c b/src/prctl.c
index 62e79510e..6b645d42b 100644
--- a/src/prctl.c
+++ b/src/prctl.c
@@ -13,6 +13,12 @@
 
 #include <linux/prctl.h>
 
+#ifdef __ANDROID__
+# ifndef PR_SET_VMA
+#  define PR_SET_VMA 0x53564d41 /* "SVMA" */
+# endif
+#endif
+
 #include "xstring.h"
 
 #include "xlat/prctl_options.h"