aboutsummaryrefslogtreecommitdiff
path: root/src/lib/malloc
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-05-29 09:22:18 -0400
committerDavid Goulet <dgoulet@torproject.org>2019-06-11 11:29:23 -0400
commitcad0de35bd49064f5712f32a2b6e41ffe6e822e6 (patch)
treecbb916898b8d81fbcd5e026dad2f1b6a05efdf81 /src/lib/malloc
parent93ddc51cbd325ef3d5cf3a5b9948ff65c09fc5aa (diff)
downloadtor-cad0de35bd49064f5712f32a2b6e41ffe6e822e6.tar.gz
tor-cad0de35bd49064f5712f32a2b6e41ffe6e822e6.zip
Give a compile warning when we don't have any flags for minherit().
Part of ticket 30686.
Diffstat (limited to 'src/lib/malloc')
-rw-r--r--src/lib/malloc/map_anon.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/malloc/map_anon.c b/src/lib/malloc/map_anon.c
index f4fda00bff..6afea713df 100644
--- a/src/lib/malloc/map_anon.c
+++ b/src/lib/malloc/map_anon.c
@@ -70,6 +70,11 @@
#endif
+#if defined(HAVE_MINHERIT) && !defined(FLAG_ZERO) && !defined(FLAG_NOINHERIT)
+#warn "minherit() is defined, but we couldn't find the right flag for it."
+#warn "This is probably a bug in Tor's support for this platform."
+#endif
+
/**
* Helper: try to prevent the <b>sz</b> bytes at <b>mem</b> from being swapped
* to disk. Return 0 on success or if the facility is not available on this