X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fnetcat%2F0001-signed-bit-counting.patch;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fnetcat%2F0001-signed-bit-counting.patch;h=e29da311a989d666c439fe4d992bac6d96317c65;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/netcat/0001-signed-bit-counting.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/netcat/0001-signed-bit-counting.patch new file mode 100644 index 0000000..e29da31 --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/netcat/0001-signed-bit-counting.patch @@ -0,0 +1,30 @@ +# Fix the endian-specific bit-counting code so that it works. +# SF:1068324 "netcat_flag_count() fix" +# http://sourceforge.net/tracker/?func=detail&aid=1205729&group_id=52204&atid=466046 +# SF:1205729 "doen't work on arm linux platform": +# http://sourceforge.net/tracker/?func=detail&aid=1068324&group_id=52204&atid=466046 + +Index: netcat-0.7.1/src/flagset.c +=================================================================== +--- netcat-0.7.1.orig/src/flagset.c 2010-07-19 13:51:46.000000000 +0100 ++++ netcat-0.7.1/src/flagset.c 2010-07-19 13:52:27.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,8 +154,8 @@ + 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); +- c <<= 1; ++ ret += c&1; ++ c>>=1; + } + } +