]> code.ossystems Code Review - openembedded-core.git/commit
tcp-wrappers: remove size_t.patch
authorRoy.Li <rongqing.li@windriver.com>
Sat, 2 Feb 2013 08:18:22 +0000 (16:18 +0800)
committerRoss Burton <ross.burton@intel.com>
Fri, 1 Mar 2013 14:44:40 +0000 (14:44 +0000)
commitc98fd6606f0e253453bf5478636f6b57fc641377
treec6392acb69c808ed8aa7fba6f693aab2d6f8bc18
parentd8204a21becac6f7eb54096c6af22d6de64eb932
tcp-wrappers: remove size_t.patch

1. it introduces bug in 64bit big endian process with __GLIBC__, At that
condition, size_t is 8byte, and the third parameter of getpeername is
socklen_t which is 4 byte. As a result, getpeername sees third parameter
is always 0, and can not return right value.

The similar program is below, the output is 0, not 9 on PPC64 cpu
main()
{
long aa=9;
printf("%d \n", *((int *)&aa));
}

2. The correct fix is to change getpeername/getsockopt/recvfrom.. last
parameter type from int to socklen_t, but to simplify, we can remove
size_t.patch, since the size of int is same as socklen_t in 32bit/64bit
cpu. and size_t.patch only change three places, there are other places
which uses int, and work well.

2. Fedora, redhat el4 do not use this patch, but Debian uses it, does not
find why this patch is written, maybe it is gcc legency issue which does
not exist.

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/size_t.patch [deleted file]
meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb