From da9c3553fd055c47bae805ce462286cb46121d42 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 16 May 2020 15:30:42 +0800 Subject: [PATCH] fix build error --- fix-null-directive-argument.patch | 19 +++++++++++++++++++ ltrace.spec | 6 +++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 fix-null-directive-argument.patch diff --git a/fix-null-directive-argument.patch b/fix-null-directive-argument.patch new file mode 100644 index 0000000..162c4a7 --- /dev/null +++ b/fix-null-directive-argument.patch @@ -0,0 +1,19 @@ +diff -Nur ltrace-0.7.91_old/output.c ltrace-0.7.91/output.c +--- ltrace-0.7.91_old/output.c 2020-05-16 15:14:38.069921077 +0800 ++++ ltrace-0.7.91/output.c 2020-05-16 15:19:20.657858742 +0800 +@@ -598,12 +598,11 @@ + NULL, NULL, NULL); + symname = dwfl_module_addrinfo(mod, pc, &off, &sym, + NULL, NULL, NULL); ++ /* This mimics the output produced by libunwind below. */ ++ fprintf(options.output, " > %s(%s+0x%" PRIx64 ") [%" PRIx64 "]\n", ++ modname, symname, off, pc); + } + +- /* This mimics the output produced by libunwind below. */ +- fprintf(options.output, " > %s(%s+0x%" PRIx64 ") [%" PRIx64 "]\n", +- modname, symname, off, pc); +- + /* See if we can extract the source line too and print it on + the next line if we can find it. */ + if (mod != NULL) { diff --git a/ltrace.spec b/ltrace.spec index dc6d3a2..b422c17 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,6 +1,6 @@ name: ltrace Version: 0.7.91 -Release: 29 +Release: 30 Summary: Trace the Library and System Calls a Program Makes License: GPLv2+ @@ -28,6 +28,7 @@ Patch0016: ltrace-0.7.91-aarch64-params.patch Patch9000: bugfix-0001-ltrace-0.7.91-aarch64_be-compile-support.patch Patch9001: bugfix-0001-ltrace-byteswap-instruction-in-arm-be8-mode.patch Patch9002: bugfix-for-use-after-free-about-soname.patch +Patch9003: fix-null-directive-argument.patch BuildRequires: elfutils-devel dejagnu libselinux-devel autoconf automake libtool @@ -73,5 +74,8 @@ autoreconf -i %{_mandir}/man5/ltrace.conf.5* %changelog +* Sat May 16 2020 Senlin Xia - 0.7.91-30 +- fix the error: "%s" directive argument is NULL [-Werror=format-overflow=] + * Wed Nov 27 2019 daiqianwen - 0.7.91-29 - Package init. -- Gitee