summaryrefslogtreecommitdiff
path: root/debian/patches/leaks0001-xxx-print-fail.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/leaks0001-xxx-print-fail.patch')
-rw-r--r--debian/patches/leaks0001-xxx-print-fail.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/debian/patches/leaks0001-xxx-print-fail.patch b/debian/patches/leaks0001-xxx-print-fail.patch
new file mode 100644
index 00000000..de9fc0ed
--- /dev/null
+++ b/debian/patches/leaks0001-xxx-print-fail.patch
@@ -0,0 +1,47 @@
+From 6f7a1ab15d87b9d47e5d05c0b473c7e645385afe Mon Sep 17 00:00:00 2001
+From: Justus Winter <justus@gnupg.org>
+Date: Sat, 4 Jun 2016 04:40:44 +0200
+Subject: [PATCH hurd 1/2] xxx print fail
+
+---
+ libshouldbeinlibc/assert-backtrace.c | 8 ++++++++
+ libshouldbeinlibc/assert-backtrace.h | 6 ++++++
+ 2 files changed, 14 insertions(+)
+
+diff --git a/libshouldbeinlibc/assert-backtrace.c b/libshouldbeinlibc/assert-backtrace.c
+index ca23c8d..72a49e9 100644
+--- a/libshouldbeinlibc/assert-backtrace.c
++++ b/libshouldbeinlibc/assert-backtrace.c
+@@ -76,4 +76,12 @@ __assert_perror_fail_backtrace (int errnum,
+
+ }
+
++void
++__print_fail_backtrace (const char *message, const char *file,
++ unsigned int line, const char *function)
++{
++ __assert_fail_base_backtrace ("%s: %s:%u: %s: %s.\n",
++ message, file, line, function);
++}
++
+ #endif /* ! defined NDEBUG */
+diff --git a/libshouldbeinlibc/assert-backtrace.h b/libshouldbeinlibc/assert-backtrace.h
+index c54b810..b36e5b2 100644
+--- a/libshouldbeinlibc/assert-backtrace.h
++++ b/libshouldbeinlibc/assert-backtrace.h
+@@ -42,6 +42,12 @@ void __assert_perror_fail_backtrace (int errnum,
+ const char *function)
+ __attribute__ ((noreturn, unused));
+
++/* Likewise, but prints the given MESSAGE. */
++void
++__print_fail_backtrace (const char *message, const char *file,
++ unsigned int line, const char *function)
++ __attribute__ ((noreturn, unused));
++
+ #define assert_backtrace(expr) \
+ ((expr) \
+ ? (void) 0 \
+--
+2.1.4
+