On 2011-06-27 08:10, Stefan Hajnoczi wrote: > On Mon, Jun 27, 2011 at 6:29 AM, Stefan Weil <w...@mail.berlios.de> wrote: >> Commit f26e428da505709ec03b2ed2c9eb3db82b30bd7b fixed compilation >> with --enable-vnc-png, but broke it with --enable-vnc-png. >> >> The breakage is caused by pngconfig.h which checks whether >> setjmp.h was already included and fails because qemu-common.h >> includes setjmp.h. >> >> The check is disabled by defining PNG_SKIP_SETJMP_CHECK. >> >> Cc: Blue Swirl <blauwir...@gmail.com> >> Signed-off-by: Stefan Weil <w...@mail.berlios.de> >> --- >> ui/vnc-enc-tight.c | 3 +++ >> 1 files changed, 3 insertions(+), 0 deletions(-) > > Reviewed-by: Stefan Hajnoczi <stefa...@linux.vnet.ibm.com> > > Some more info on why Stefan Weil's fix is correct: > > The setjmp(3) man page says, > > "POSIX does not specify whether setjmp() will save the signal > mask. In System V it will not. In 4.3BSD it will, and there is a > function _setjmp that will not. By default, Linux/glibc follows the > System V behavior, but the BSD behavior is provided if the > _BSD_SOURCE feature test macro is defined and none of > _POSIX_SOURCE, _POSIX_C_SOURCE, _XOPEN_SOURCE, > _XOPEN_SOURCE_EXTENDED, _GNU_SOURCE, or _SVID_SOURCE is defined." > > Apparently libpng wants to make sure that the setjmp() which will not > save signal masks is used on Linux. The problem is that Linux > supports both versions and jmp_buf is part of the libpng API. That > means the application and the library need to agree on which setjmp() > semantics will be used. > > That said, QEMU doesn't seem to make use of the jmp_buf API in libpng, > so this really shouldn't matter at all. We can skip the header check.
That sounds good. Please adjust the comment that this patch introduces. Jan
signature.asc
Description: OpenPGP digital signature