Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I2AJm-0004nB-L7 for qemu-devel@nongnu.org; Sat, 23 Jun 2007 14:26:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I2AJh-0004mB-2c for qemu-devel@nongnu.org; Sat, 23 Jun 2007 14:26:42 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I2AJg-0004m8-TF for qemu-devel@nongnu.org; Sat, 23 Jun 2007 14:26:36 -0400 Received: from smtp.gentoo.org ([140.211.166.183]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1I2AJg-0007Qa-DU for qemu-devel@nongnu.org; Sat, 23 Jun 2007 14:26:36 -0400 Received: from ip6-localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 67E6564EC0 for ; Sat, 23 Jun 2007 18:26:16 +0000 (UTC) From: Mike Frysinger Date: Sat, 23 Jun 2007 14:27:24 -0400 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_NYWfG3SfRwWe2NU" Message-Id: <200706231427.25271.vapier@gentoo.org> Subject: [Qemu-devel] [patch] use socklen_t with getsockopt() Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --Boundary-00=_NYWfG3SfRwWe2NU Content-Type: multipart/signed; boundary="nextPart1947926.BqYxbtuotP"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1947926.BqYxbtuotP Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline obvious fixup ... getsockopt() takes a socklen_t, not an int -mike --nextPart1947926.BqYxbtuotP Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (GNU/Linux) iQIVAwUARn1mDUFjO5/oN/WBAQLB2A//cY/aIGtOCZR5tHlN6Df/mC3lcRS5ATpH 0iOfMIy4THc6x7iyE+9qrDIr2G0tuDE/L0GHnDuKAF5TlinvUlvozizM36fh1+PB M+mSSN5ABgw7LsiHy848rS73UfAUL4FvqeyHkElTXUvlBGpyVmCAE9tF/XRvnU30 ByrCLB7DxJ/M4ycJYvov8pOEM1aTQXMqdut9MZJc/lhzZDpSZLRiuTZ/LU5OxF8Z OSuK33XyuMJWBI8oa8lNW8Oba/33alCBG0DsXBRe0RcysFmcpEE5pp0h1d+HOIW+ CjUYYqtMmpdde6RHNaHKQalk3BIRmjpPFLX906WT26fGjjqDHpa35LcRvlBaiTEY O9VPYSV+GxFwhmrpiPa93FhQfL3TBz/0idYGtJ2doRQxrR7E27agHvxvzOVQ02kf CQ+13oCh2kBJsKKjFGiSHqmp+Ks83tMoyKnnv26pbuyEQIYAsvHewn302Tu3Ba6e kBoDTQ+H4E9+1nO0kMEgSKdxcfQU/0VmvK+zQhYfWQsBBVcQBb98GUXc0HeK6I+x qUr+cklaJSrlRS09nBKBfONoLNr/NT6DixOVtfPCBEVgQvcADbkZVz3fwpqHDqyI lcWh8h+XxYOrSHuqy6yE9cW7tqp3tkUFLgzBm92cGMXTeZisRi9zntUdvvxYBPC0 0KS0DaOPxg0= =mA/0 -----END PGP SIGNATURE----- --nextPart1947926.BqYxbtuotP-- --Boundary-00=_NYWfG3SfRwWe2NU Content-Type: text/x-diff; charset="us-ascii"; name="qemu-socklen-t.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qemu-socklen-t.patch" --- linux-user/syscall.c +++ linux-user/syscall.c @@ -642,7 +642,8 @@ static long do_setsockopt(int sockfd, in static long do_getsockopt(int sockfd, int level, int optname, target_ulong optval, target_ulong optlen) { - int len, lv, val, ret; + int len, val, ret; + socklen_t lv; switch(level) { case TARGET_SOL_SOCKET: @@ -665,7 +666,7 @@ static long do_getsockopt(int sockfd, in len = tget32(optlen); if (len < 0) return -EINVAL; - lv = sizeof(int); + lv = sizeof(val); ret = get_errno(getsockopt(sockfd, level, optname, &val, &lv)); if (ret < 0) return ret; @@ -698,7 +699,7 @@ static long do_getsockopt(int sockfd, in len = tget32(optlen); if (len < 0) return -EINVAL; - lv = sizeof(int); + lv = sizeof(val); ret = get_errno(getsockopt(sockfd, level, optname, &val, &lv)); if (ret < 0) return ret; --Boundary-00=_NYWfG3SfRwWe2NU--