llvm-gcc broken in iPhone SDK?

There’s an error trying to build a “hello world” project out of the box when selecting LLVM from the list of compilers in iPhone SDK:
http://arrelid.com/archive/2009/01/15/xcode-iphone-sdk-llvm-gcc-fixing-what-apple-forgot
This is on XCode 3.1.2, iPhone SDK 2.2.1 .

The blogger suggests what looks like a hack – is there a proper solution to this? Is llvm-gcc just missing a header that needs to be added to its distribution?
Also, switching from GCC 4.0 (default compiler) to GCC 4.2 also exhibits the same error, and it’s not obvious how to fix it – the idea from the blog post above isn’t applicable.

On the bright side, Wolfenstein3D builds and runs when built with LLVM on the iPhone simulator, although it has a minor color issue with background: the normal color and the color shown when the user sustains hits are reversed. Try it out to see what I mean: http://www.idsoftware.com/wolfenstein3dclassic/ – the source code is in the bottom-right corner.

Misha

This is the LLVM development mailing list; this isn't the right place
to ask for support for Apple's LLVM distribution.

-Eli