I'd posted a patch to fix this a few weeks ago. I'm not sure exactly why, but #include'ing config.h before any other includes fixes the problem. This touched maybe a couple dozen files. http://mailman.videolan.org/pipermail/vlc-devel/2008-May/042733.html