On Wed, 3 Feb 2010 16:37:24 +0000 Sad Clouds <cryintothebluesky@xxxxxxxxxxxxxx> wrote: > After everything is installed I try to compile a test program: > > cd /opt/cross/bin > cat > test.c > #include <stddef.h> > int main(void) > { > size_t n; > } > ^D > > ./i386-netbsdelf5.0-gc test.c > test.c: In function 'main': > test.c:5: error: 'size_t' undeclared (first use in this function) > test.c:5: error: (Each undeclared identifier is reported only once > test.c:5: error: for each function it appears in.) > test.c:5: error: expected ';' before 'n' > > Any idea why GCC is not picking up size_t from its header files? OK nevermind I found what it was, GCC needs the following patch to fix the above issue for NetBSD: --- gcc/Makefile.in.orig 2009-05-27 00:57:20 +0200 +++ gcc/Makefile.in @@ -310,7 +310,6 @@ USER_H = $(srcdir)/ginclude/float.h \ $(srcdir)/ginclude/iso646.h \ $(srcdir)/ginclude/stdarg.h \ $(srcdir)/ginclude/stdbool.h \ - $(srcdir)/ginclude/stddef.h \ $(srcdir)/ginclude/varargs.h \ $(srcdir)/ginclude/stdfix.h \ $(EXTRA_HEADERS)