wok-next rev 20134

wvstreams: add gcc-6.patch
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Oct 31 16:43:49 2017 +0100 (2017-10-31)
parents c12ed7fac2f7
children 33dd7a5cc1fd
files wvstreams/stuff/patches/gcc-6.patch wvstreams/stuff/patches/series
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/wvstreams/stuff/patches/gcc-6.patch	Tue Oct 31 16:43:49 2017 +0100
     1.3 @@ -0,0 +1,42 @@
     1.4 +Description: Fix compilation with gcc-6
     1.5 +Author: Gert Wollny <gw.fossdev@gmail.com>
     1.6 +Last-Updated: 2016-07-26
     1.7 +Forwarded: No
     1.8 +Bug-Debian: https://bugs.debian.org/811659
     1.9 +Bug-Debian: https://bugs.debian.org/831146
    1.10 +
    1.11 +--- a/streams/wvstream.cc
    1.12 ++++ b/streams/wvstream.cc
    1.13 +@@ -907,9 +907,9 @@
    1.14 +     
    1.15 +     if (forceable)
    1.16 +     {
    1.17 +-	si.wants.readable = readcb;
    1.18 +-	si.wants.writable = writecb;
    1.19 +-	si.wants.isexception = exceptcb;
    1.20 ++	si.wants.readable = static_cast<bool>(readcb);
    1.21 ++	si.wants.writable = static_cast<bool>(writecb);
    1.22 ++	si.wants.isexception = static_cast<bool>(exceptcb);
    1.23 +     }
    1.24 +     else
    1.25 +     {
    1.26 +@@ -1019,7 +1019,8 @@
    1.27 + 
    1.28 + IWvStream::SelectRequest WvStream::get_select_request()
    1.29 + {
    1.30 +-    return IWvStream::SelectRequest(readcb, writecb, exceptcb);
    1.31 ++    return IWvStream::SelectRequest(static_cast<bool>(readcb), static_cast<bool>(writecb),
    1.32 ++				    static_cast<bool>(exceptcb));
    1.33 + }
    1.34 + 
    1.35 + 
    1.36 +@@ -1107,7 +1108,8 @@
    1.37 +     // inefficient, because if the alarm was expired then pre_select()
    1.38 +     // returned true anyway and short-circuited the previous select().
    1.39 +     TRACE("hello-%p\n", this);
    1.40 +-    return !alarm_was_ticking || select(0, readcb, writecb, exceptcb);
    1.41 ++    return !alarm_was_ticking || select(0, static_cast<bool>(readcb),
    1.42 ++					static_cast<bool>(writecb), static_cast<bool>(exceptcb));
    1.43 + }
    1.44 + 
    1.45 + 
     2.1 --- a/wvstreams/stuff/patches/series	Tue Oct 31 16:34:48 2017 +0200
     2.2 +++ b/wvstreams/stuff/patches/series	Tue Oct 31 16:43:49 2017 +0100
     2.3 @@ -1,1 +1,2 @@
     2.4  package-wvstreams-add-patch-to-fix-build-with-C99-compilers.patch
     2.5 +gcc-6.patch