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: Jan Kiszka
Subject: Re: [Qemu-devel] [PATCH] vnc: Fix compilation with --enable-vnc-png
Date: Mon, 27 Jun 2011 08:19:42 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

On 2011-06-27 08:10, Stefan Hajnoczi wrote:
> 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.

That sounds good. Please adjust the comment that this patch introduces.

Jan


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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