From d9b0b29261a55e98cda64e3851ad63eb690660cf Mon Sep 17 00:00:00 2001 From: jow Date: Sat, 7 Feb 2009 02:33:24 +0000 Subject: [PATCH] [packages] fix endianess issue in netcat git-svn-id: svn://svn.openwrt.org/openwrt/packages@14427 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/netcat/Makefile | 2 +- .../patches/001-netcat_flag_count.patch | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 net/netcat/patches/001-netcat_flag_count.patch diff --git a/net/netcat/Makefile b/net/netcat/Makefile index 4354a978b..19906cc06 100644 --- a/net/netcat/Makefile +++ b/net/netcat/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=netcat PKG_VERSION:=0.7.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/$(PKG_NAME) diff --git a/net/netcat/patches/001-netcat_flag_count.patch b/net/netcat/patches/001-netcat_flag_count.patch new file mode 100644 index 000000000..44ee9e1f9 --- /dev/null +++ b/net/netcat/patches/001-netcat_flag_count.patch @@ -0,0 +1,22 @@ +Index: netcat-0.7.1/src/flagset.c +=================================================================== +--- netcat-0.7.1.orig/src/flagset.c 2009-02-06 19:56:01.000000000 +0100 ++++ netcat-0.7.1/src/flagset.c 2009-02-06 19:56:13.000000000 +0100 +@@ -134,7 +134,7 @@ + + int netcat_flag_count(void) + { +- register char c; ++ register unsigned char c; + register int i; + int ret = 0; + +@@ -154,7 +154,7 @@ + Assumed that the bit number 1 is the sign, and that we will shift the + bit 1 (or the bit that takes its place later) until the the most right, + WHY it has to keep the wrong sign? */ +- ret -= (c >> 7); ++ ret += (c >> 7); + c <<= 1; + } + }