diff options
Diffstat (limited to 'meta-tpm/recipes-tpm/libtpm/files/Use-format-s-for-call-to-dprintf.patch')
-rw-r--r-- | meta-tpm/recipes-tpm/libtpm/files/Use-format-s-for-call-to-dprintf.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/meta-tpm/recipes-tpm/libtpm/files/Use-format-s-for-call-to-dprintf.patch b/meta-tpm/recipes-tpm/libtpm/files/Use-format-s-for-call-to-dprintf.patch new file mode 100644 index 0000000..a71b5c1 --- /dev/null +++ b/meta-tpm/recipes-tpm/libtpm/files/Use-format-s-for-call-to-dprintf.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 6a9b4e5d70f770aa9ca31e3e6d3b1ae72c192070 Mon Sep 17 00:00:00 2001 | ||
2 | From: Stefan Berger <stefanb@linux.vnet.ibm.com> | ||
3 | Date: Tue, 31 Jan 2017 20:10:51 -0500 | ||
4 | Subject: [PATCH] Use format '%s' for call to dprintf | ||
5 | |||
6 | Fix the dprintf call to use a format parameter that otherwise causes | ||
7 | errors with gcc on certain platforms. | ||
8 | |||
9 | Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> | ||
10 | |||
11 | Upstream-Status: Backport | ||
12 | replaces local patch | ||
13 | Signed-off-by: Armin Kuster <akuster@mvsita.com> | ||
14 | |||
15 | --- | ||
16 | src/tpm_library.c | 4 ++-- | ||
17 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
18 | |||
19 | Index: git/src/tpm_library.c | ||
20 | =================================================================== | ||
21 | --- git.orig/src/tpm_library.c | ||
22 | +++ git/src/tpm_library.c | ||
23 | @@ -405,8 +405,8 @@ int TPMLIB_LogPrintf(const char *format, | ||
24 | } | ||
25 | |||
26 | if (debug_prefix) | ||
27 | - dprintf(debug_fd, debug_prefix); | ||
28 | - dprintf(debug_fd, buffer); | ||
29 | + dprintf(debug_fd, "%s", debug_prefix); | ||
30 | + dprintf(debug_fd, "%s", buffer); | ||
31 | |||
32 | return i; | ||
33 | } | ||