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.
Regards,
Erik
diff -urN klibc-0.202-pristine/include/bits32/bitsize/stddef.h
klibc-0.202/include/bits32/bitsize/stddef.h
--- klibc-0.202-pristine/include/bits32/bitsize/stddef.h 2004-07-07
02:41:04.000000000 +0200
+++ klibc-0.202/include/bits32/bitsize/stddef.h 2005-03-02 20:41:19.000000000
+0100
@@ -5,12 +5,14 @@
#ifndef _BITSIZE_STDDEF_H
#define _BITSIZE_STDDEF_H
+#ifndef _SIZE_T
#define _SIZE_T
#if defined(__s390__) || defined(__hppa__) || defined(__cris__)
typedef unsigned long size_t;
#else
typedef unsigned int size_t;
#endif
+#endif
#define _PTRDIFF_T
typedef signed int ptrdiff_t;