commit:     87d6537245b6f7cbf028e4c0e187cda7484729f0
Author:     Guenther Brunthaler <gb_about_gnu <AT> gmx <DOT> net>
AuthorDate: Sun Nov 27 18:30:36 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Nov 27 18:30:36 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=87d65372

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

 libsbutil/sb_gdb.c | 2 ++
 1 file changed, 2 insertions(+)

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

Reply via email to