On 11 October 2016 at 19:12, Eric Blake <ebl...@redhat.com> wrote: > On 10/11/2016 01:03 PM, Programmingkid wrote: > >>> +/* Mac OSX has a <stdint.h> bug that incorrectly defines SIZE_MAX with >>> + * the wrong type. Our replacement isn't usable in preprocessor >>> + * expressions, but it is sufficient for our needs. */ >>> +#if defined(HAVE_BROKEN_SIZE_MAX) && HAVE_BROKEN_SIZE_MAX >>> +#undef SIZE_MAX >>> +#define SIZE_MAX ((size_t)-1) >>> +#endif >>> + > >> I have applied your patch to the most recent git commit >> (627eae7d729277c84f8e0ac07a8caab39c92c38d) on Mac OS 10.6.8. QEMU built >> without any problems using gcc 4.9. > > Did you also tweak the code to make sure there was an instance of > printf("%zu", SIZE_MAX) (or similar)? It's not enough that it compiles > without complaint (although that helps), but also that the > compiler-warning-on-printf goes away (which we currently don't have any > in the tree, because we've been writing '"%zu", (size_t)SIZE_MAX' to > work around the broken headers).
I have made that check, and tested that the patch causes the resulting build failure to go away. I'll apply this to master... thanks -- PMM