qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] vnc: Fix compilation with --enable-vnc-png


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] vnc: Fix compilation with --enable-vnc-png
Date: Mon, 27 Jun 2011 07:10:08 +0100

On Mon, Jun 27, 2011 at 6:29 AM, Stefan Weil <address@hidden> 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 <address@hidden>
> Signed-off-by: Stefan Weil <address@hidden>
> ---
>  ui/vnc-enc-tight.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)

Reviewed-by: Stefan Hajnoczi <address@hidden>

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.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]