aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/iptraf/iptraf
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-devtools/iptraf/iptraf')
-rw-r--r--meta-oe/recipes-devtools/iptraf/iptraf/format_string.patch31
-rw-r--r--meta-oe/recipes-devtools/iptraf/iptraf/ldopts.patch35
2 files changed, 66 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;
diff --git a/meta-oe/recipes-devtools/iptraf/iptraf/ldopts.patch b/meta-oe/recipes-devtools/iptraf/iptraf/ldopts.patch
new file mode 100644
index 0000000000..c84a0a0adf
--- /dev/null
+++ b/meta-oe/recipes-devtools/iptraf/iptraf/ldopts.patch
@@ -0,0 +1,35 @@
+Index: iptraf-3.0.0/src/Makefile
+===================================================================
+--- iptraf-3.0.0.orig/src/Makefile
++++ iptraf-3.0.0/src/Makefile
+@@ -5,7 +5,7 @@
+ #
+ # Architecture determination string borrowed from the kernel makefile.
+ #
+-ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
++ARCH ?= $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
+ -e s/arm.*/arm/ -e s/sa110/arm/)
+ PLATFORM = -DPLATFORM=\"$(shell uname -s)/$(ARCH)\"
+ VERNUMBER := $(shell cat version)
+@@ -17,7 +17,7 @@ VERSION = -DVERSION=\"$(VERNUMBER)\"
+ #
+ BINDIR = ../../iptraf-$(VERNUMBER).bin.$(ARCH)
+
+-CC = gcc
++CC = $(CC)
+ LIBS = -L../support -ltextbox -lpanel -lncurses # in this order!
+
+ # comment this one out to omit debug code when done.
+@@ -31,10 +31,10 @@ PROF = #-pg
+ # options to be passed to the compiler. I don't believe they need to be
+ # modified (except for -m486 on non-Intel x86 platforms).
+
+-CFLAGS = -Wall #-O2 #-m486
++CFLAGS ?= -Wall #-O2 #-m486
+ DIRS = -DWORKDIR=\"$(WORKDIR)\" \
+ -DLOGDIR=\"$(LOGDIR)\" -DEXECDIR=\"$(TARGET)\"
+-LDOPTS = #-static
++LDOPTS ?= #-static
+
+ # you may want to change this to point to your ncurses include directory
+ # if the ncurses include files are not in the default location.