summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorRoy.Li <rongqing.li@windriver.com>2013-07-16 13:07:46 +0800
committerJoe MacDonald <joe.macdonald@windriver.com>2013-07-17 15:44:38 -0400
commit6c293df99b5bb88072d84d9cf06b9e72fcbfba0c (patch)
tree6eb7f934a0ab03f9e6f395df0d8b7b5744d97ab3 /meta-networking
parent186cb2068cd1a94977c0dff863cce77ef9f1d0aa (diff)
downloadmeta-openembedded-6c293df99b5bb88072d84d9cf06b9e72fcbfba0c.tar.gz
netcat: integrate two fixes
1. fix a running issue on PPC, since 'char' type has different range of values on x86 and on PPC. 2. fix a building issue. Signed-off-by: Roy.Li <rongqing.li@windriver.com> Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch34
-rw-r--r--meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch25
-rw-r--r--meta-networking/recipes-support/netcat/netcat_0.7.1.bb2
3 files changed, 61 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch b/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch
new file mode 100644
index 000000000..dd1938a99
--- /dev/null
+++ b/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch
@@ -0,0 +1,34 @@
1Make netcat_flag_count() return positive value
2
3C language has 3 distinct char types:
4 char
5 unsigned char
6 signed char
7A char has the same range of values as signed char on X86,
8but same as unsigned char on PPC which made netcat_flag_count
9return a negative value, now we force variable c as signed char
10to make netcat_flag_count return positive value.
11
12Upstream-Status: Pending
13
14Signed-off-by: Roy.Li <rongqing.li@windriver.com>
15---
16 src/flagset.c | 2 +-
17 1 files changed, 1 insertions(+), 1 deletions(-)
18
19diff --git a/src/flagset.c b/src/flagset.c
20index 442b634..54ac898 100644
21--- a/src/flagset.c
22+++ b/src/flagset.c
23@@ -134,7 +134,7 @@ unsigned short netcat_flag_next(unsigned short port)
24
25 int netcat_flag_count(void)
26 {
27- register char c;
28+ register signed char c;
29 register int i;
30 int ret = 0;
31
32--
331.7.5.4
34
diff --git a/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch b/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch
new file mode 100644
index 000000000..5cbcb08e8
--- /dev/null
+++ b/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch
@@ -0,0 +1,25 @@
1Apparently somewhere along the line HAVE_LOCALE_H was changed to
2HAVE_LC_MESSAGES. Adjust netcat to match.
3
4Upstream-Status: Pending
5
6Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
7
8Index: netcat-0.7.1/src/intl.h
9===================================================================
10--- netcat-0.7.1.orig/src/intl.h
11+++ netcat-0.7.1/src/intl.h
12@@ -25,11 +25,11 @@
13 #ifdef ENABLE_NLS
14 #include <libintl.h>
15
16-#ifdef HAVE_LOCALE_H
17+#if defined(HAVE_LC_MESSAGES) || defined(HAVE_LOCALE_H)
18 #include <locale.h>
19 #else
20 #error You must have locale.h in your system
21-#endif /* HAVE_LOCALE_H */
22+#endif /* HAVE_LC_MESSAGES || HAVE_LOCALE_H */
23
24 /* Our dear (and very common) gettext macros */
25 #define _(String) gettext(String)
diff --git a/meta-networking/recipes-support/netcat/netcat_0.7.1.bb b/meta-networking/recipes-support/netcat/netcat_0.7.1.bb
index a4805a4c3..0bb5c8789 100644
--- a/meta-networking/recipes-support/netcat/netcat_0.7.1.bb
+++ b/meta-networking/recipes-support/netcat/netcat_0.7.1.bb
@@ -8,6 +8,8 @@ PR = "r3"
8 8
9SRC_URI = "${SOURCEFORGE_MIRROR}/netcat/netcat-${PV}.tar.bz2 \ 9SRC_URI = "${SOURCEFORGE_MIRROR}/netcat/netcat-${PV}.tar.bz2 \
10 file://obsolete_autoconf_macros.patch \ 10 file://obsolete_autoconf_macros.patch \
11 file://netcat-locale_h.patch \
12 file://make-netcat_flag_count_work.patch \
11" 13"
12 14
13SRC_URI[md5sum] = "0a29eff1736ddb5effd0b1ec1f6fe0ef" 15SRC_URI[md5sum] = "0a29eff1736ddb5effd0b1ec1f6fe0ef"