diff options
-rw-r--r-- | meta-oe/recipes-devtools/iptraf/iptraf/format_string.patch | 31 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/iptraf/iptraf/ldopts.patch | 35 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/iptraf/iptraf_3.0.0.bb | 7 |
3 files changed, 71 insertions, 2 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 @@ | |||
1 | Index: iptraf-3.0.0/src/othptab.c | ||
2 | =================================================================== | ||
3 | --- iptraf-3.0.0.orig/src/othptab.c | ||
4 | +++ iptraf-3.0.0/src/othptab.c | ||
5 | @@ -335,7 +335,7 @@ void printothpentry(struct othptable *ta | ||
6 | break; | ||
7 | } | ||
8 | |||
9 | - sprintf(scratchpad, inet_ntoa(saddr)); | ||
10 | + sprintf(scratchpad, "%s", inet_ntoa(saddr)); | ||
11 | strcat(msgstring, scratchpad); | ||
12 | wattrset(table->othpwin, ARPATTR); | ||
13 | break; | ||
14 | @@ -354,7 +354,7 @@ void printothpentry(struct othptable *ta | ||
15 | break; | ||
16 | } | ||
17 | |||
18 | - sprintf(scratchpad, rarp_mac_addr); | ||
19 | + sprintf(scratchpad, "%s", rarp_mac_addr); | ||
20 | strcat(msgstring, scratchpad); | ||
21 | wattrset(table->othpwin, ARPATTR); | ||
22 | break; | ||
23 | @@ -421,7 +421,7 @@ void printothpentry(struct othptable *ta | ||
24 | wattrset(table->othpwin, UNKNIPATTR); | ||
25 | protptr = getprotobynumber(entry->protocol); | ||
26 | if (protptr != NULL) { | ||
27 | - sprintf(protname, protptr->p_aliases[0]); | ||
28 | + sprintf(protname, "%s", protptr->p_aliases[0]); | ||
29 | } else { | ||
30 | sprintf(protname, "IP protocol"); | ||
31 | 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 @@ | |||
1 | Index: iptraf-3.0.0/src/Makefile | ||
2 | =================================================================== | ||
3 | --- iptraf-3.0.0.orig/src/Makefile | ||
4 | +++ iptraf-3.0.0/src/Makefile | ||
5 | @@ -5,7 +5,7 @@ | ||
6 | # | ||
7 | # Architecture determination string borrowed from the kernel makefile. | ||
8 | # | ||
9 | -ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ | ||
10 | +ARCH ?= $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ | ||
11 | -e s/arm.*/arm/ -e s/sa110/arm/) | ||
12 | PLATFORM = -DPLATFORM=\"$(shell uname -s)/$(ARCH)\" | ||
13 | VERNUMBER := $(shell cat version) | ||
14 | @@ -17,7 +17,7 @@ VERSION = -DVERSION=\"$(VERNUMBER)\" | ||
15 | # | ||
16 | BINDIR = ../../iptraf-$(VERNUMBER).bin.$(ARCH) | ||
17 | |||
18 | -CC = gcc | ||
19 | +CC = $(CC) | ||
20 | LIBS = -L../support -ltextbox -lpanel -lncurses # in this order! | ||
21 | |||
22 | # comment this one out to omit debug code when done. | ||
23 | @@ -31,10 +31,10 @@ PROF = #-pg | ||
24 | # options to be passed to the compiler. I don't believe they need to be | ||
25 | # modified (except for -m486 on non-Intel x86 platforms). | ||
26 | |||
27 | -CFLAGS = -Wall #-O2 #-m486 | ||
28 | +CFLAGS ?= -Wall #-O2 #-m486 | ||
29 | DIRS = -DWORKDIR=\"$(WORKDIR)\" \ | ||
30 | -DLOGDIR=\"$(LOGDIR)\" -DEXECDIR=\"$(TARGET)\" | ||
31 | -LDOPTS = #-static | ||
32 | +LDOPTS ?= #-static | ||
33 | |||
34 | # you may want to change this to point to your ncurses include directory | ||
35 | # if the ncurses include files are not in the default location. | ||
diff --git a/meta-oe/recipes-devtools/iptraf/iptraf_3.0.0.bb b/meta-oe/recipes-devtools/iptraf/iptraf_3.0.0.bb index e7a406fc5a..abfab02e04 100644 --- a/meta-oe/recipes-devtools/iptraf/iptraf_3.0.0.bb +++ b/meta-oe/recipes-devtools/iptraf/iptraf_3.0.0.bb | |||
@@ -12,12 +12,15 @@ DEPENDS = "ncurses" | |||
12 | 12 | ||
13 | SRC_URI = " \ | 13 | SRC_URI = " \ |
14 | ftp://iptraf.seul.org/pub/iptraf/iptraf-3.0.0.tar.gz \ | 14 | ftp://iptraf.seul.org/pub/iptraf/iptraf-3.0.0.tar.gz \ |
15 | file://0001-src-Fix-error-in-cross-compile.patch" | 15 | file://0001-src-Fix-error-in-cross-compile.patch \ |
16 | file://format_string.patch \ | ||
17 | file://ldopts.patch \ | ||
18 | " | ||
16 | SRC_URI[md5sum] = "377371c28ee3c21a76f7024920649ea8" | 19 | SRC_URI[md5sum] = "377371c28ee3c21a76f7024920649ea8" |
17 | SRC_URI[sha256sum] = "9ee433d95573d612539da4b452e6cdcbca6ab6674a88bfbf6eaf12d4902b5163" | 20 | SRC_URI[sha256sum] = "9ee433d95573d612539da4b452e6cdcbca6ab6674a88bfbf6eaf12d4902b5163" |
18 | RDEPENDS_${PN} = "ncurses" | 21 | RDEPENDS_${PN} = "ncurses" |
19 | 22 | ||
20 | EXTRA_OEMAKE = "-e MAKEFLAGS=" | 23 | EXTRA_OEMAKE = "-e MAKEFLAGS= LDOPTS='${LDFLAGS}' ARCH='${TARGET_ARCH}'" |
21 | 24 | ||
22 | do_compile() { | 25 | do_compile() { |
23 | oe_runmake -C src all | 26 | oe_runmake -C src all |