components/r/patches/01-fix-zlib-fail.patch
changeset 7742 594dd2cf6dec
child 7768 b2bf3840279b
equal deleted inserted replaced
7741:563f66435845 7742:594dd2cf6dec
       
     1 zlib version check fails
       
     2 
       
     3 Fix is already committed upstream. See:
       
     4 
       
     5 https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=17204
       
     6 
       
     7 --- R-3.3.2/m4/R.m4.orig	2017-03-13 11:20:03.514638624 +0000
       
     8 +++ R-3.3.2/m4/R.m4	2017-03-13 11:20:49.190468317 +0000
       
     9 @@ -3113,10 +3113,11 @@
       
    10  #include <string.h>
       
    11  #include <zlib.h>
       
    12  int main() {
       
    13 -#ifdef ZLIB_VERSION
       
    14 -/* Work around Debian bug: it uses 1.2.3.4 even though there was no such
       
    15 -   version on the master site zlib.net */
       
    16 -  exit(strncmp(ZLIB_VERSION, "1.2.5", 5) < 0);
       
    17 +#ifdef ZLIB_VERNUM
       
    18 +  if (ZLIB_VERNUM < 0x1250) {
       
    19 +    exit(1);
       
    20 +  }
       
    21 +  exit(0);
       
    22  #else
       
    23    exit(1);
       
    24  #endif