aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuenther Brunthaler <gb_about_gnu@gmx.net>2016-11-27 13:30:36 -0500
committerMike Frysinger <vapier@gentoo.org>2016-11-27 13:30:36 -0500
commit87d6537245b6f7cbf028e4c0e187cda7484729f0 (patch)
tree2ad410009caf637b0b3af640ce1ba11e79a2c4aa
parentlibsandbox: fix symtab walking with prelinked ELFs (diff)
downloadsandbox-87d6537245b6f7cbf028e4c0e187cda7484729f0.tar.gz
sandbox-87d6537245b6f7cbf028e4c0e187cda7484729f0.tar.bz2
sandbox-87d6537245b6f7cbf028e4c0e187cda7484729f0.zip
libsbutil: elide sb_maybe_gdb when -DNDEBUG is used
Since sb_maybe_gdb is set up as a stub macro, make sure we don't define the function either to cut down on size and build failures (when the macro tries to expand the function prototype). URL: https://bugs.gentoo.org/600550
-rw-r--r--libsbutil/sb_gdb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libsbutil/sb_gdb.c b/libsbutil/sb_gdb.c
index 6112379..021a3c4 100644
--- a/libsbutil/sb_gdb.c
+++ b/libsbutil/sb_gdb.c
@@ -62,6 +62,7 @@ void sb_gdb(void)
}
}
+#ifndef NDEBUG
void sb_maybe_gdb(void)
{
if (is_env_on("SANDBOX_GDB")) {
@@ -69,3 +70,4 @@ void sb_maybe_gdb(void)
sb_gdb();
}
}
+#endif