From ebd90b9ba99cdd49a4a4eea38b1b8654af942e97 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 7 Feb 2014 16:50:55 -0800 Subject: [PATCH] Fix socklen_t (on LP64 only). Too late to fix LP32 :-( Bug: 12935461 Change-Id: Ib056ca1eaf9ae8712f88ae21ff94e91b08cf588b --- libc/include/sys/types.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libc/include/sys/types.h b/libc/include/sys/types.h index 8780996a4..534058538 100644 --- a/libc/include/sys/types.h +++ b/libc/include/sys/types.h @@ -111,7 +111,13 @@ typedef .... pthread_rwlock_attr_t; typedef .... pthread_t; #endif +#if !defined(__LP64__) +/* This historical accident means that we had a signed socklen_t on 32-bit architectures. */ +typedef __int32_t __socklen_t; +#else +/* LP64 still has a 32-bit socklen_t. */ typedef __uint32_t __socklen_t; +#endif typedef __socklen_t socklen_t; typedef __builtin_va_list __va_list;