[klibc] [PATCH] avoid size_t redefinition

H. Peter Anvin hpa at zytor.com
Wed Mar 2 16:54:27 PST 2005


Erik van Konijnenburg wrote:
> This patch protects against redefinitions of size_t.
> There are currently at least two different definitions
> provided with klibc:
> 
> 	unistd.h -> stddef.h -> bits32/bitsize/stddef.h
> 	sys/times.h -> linux/times.h -> linux/types.h
> 
> both define size_t, causing gcc to complain.
> 
> I suspect ptrdiff_t has a similar problem; not covered by
> this patch.

The problem is <linux/types.h> being invoked without <sys/types.h> 
having been included first.  <linux/types.h> is poison.  I'll add 
#include <sys/types.h> into sys/times.h.

	-hpa



More information about the klibc mailing list