aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/iptraf/iptraf/format_string.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-03-06 23:13:48 -0800
committerArmin Kuster <akuster808@gmail.com>2017-08-04 20:43:54 -0700
commit2a63f028e5f62a378eaa3a3a469099ef2ee001a6 (patch)
treecaa0b069f95fc1b2e6275fb646a3a5625dda7a26 /meta-oe/recipes-devtools/iptraf/iptraf/format_string.patch
parent0730f3f420c8b36a77d1c3aa0768ea64d9559e33 (diff)
downloadmeta-openembedded-contrib-2a63f028e5f62a378eaa3a3a469099ef2ee001a6.tar.gz
iptraf: Fix build with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> (cherry picked from commit ff5d50b43f9729fce33360fa0e9e7ff6a51ac7cf) Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/iptraf/iptraf/format_string.patch')
-rw-r--r--meta-oe/recipes-devtools/iptraf/iptraf/format_string.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/iptraf/iptraf/format_string.patch b/meta-oe/recipes-devtools/iptraf/iptraf/format_string.patch
new file mode 100644
index 0000000000..5f96f0f4c4
--- /dev/null
+++ b/meta-oe/recipes-devtools/iptraf/iptraf/format_string.patch
@@ -0,0 +1,31 @@
+Index: iptraf-3.0.0/src/othptab.c
+===================================================================
+--- iptraf-3.0.0.orig/src/othptab.c
++++ iptraf-3.0.0/src/othptab.c
+@@ -335,7 +335,7 @@ void printothpentry(struct othptable *ta
+ break;
+ }
+
+- sprintf(scratchpad, inet_ntoa(saddr));
++ sprintf(scratchpad, "%s", inet_ntoa(saddr));
+ strcat(msgstring, scratchpad);
+ wattrset(table->othpwin, ARPATTR);
+ break;
+@@ -354,7 +354,7 @@ void printothpentry(struct othptable *ta
+ break;
+ }
+
+- sprintf(scratchpad, rarp_mac_addr);
++ sprintf(scratchpad, "%s", rarp_mac_addr);
+ strcat(msgstring, scratchpad);
+ wattrset(table->othpwin, ARPATTR);
+ break;
+@@ -421,7 +421,7 @@ void printothpentry(struct othptable *ta
+ wattrset(table->othpwin, UNKNIPATTR);
+ protptr = getprotobynumber(entry->protocol);
+ if (protptr != NULL) {
+- sprintf(protname, protptr->p_aliases[0]);
++ sprintf(protname, "%s", protptr->p_aliases[0]);
+ } else {
+ sprintf(protname, "IP protocol");
+ unknown = 1;