]> git.pld-linux.org Git - packages/libxml2.git/commitdiff
enable .gz fallback only when building with zlib master
authorJan Palus <atler@pld-linux.org>
Fri, 14 Jun 2024 18:22:16 +0000 (20:22 +0200)
committerJan Palus <atler@pld-linux.org>
Fri, 14 Jun 2024 18:22:16 +0000 (20:22 +0200)
libxml2-open.gz.patch

index 61ec90a3bf8d730a64a29478702be2030150853c..1d01b0cf527b72b20b7a00fc700d1598016b64fa 100644 (file)
@@ -1,9 +1,10 @@
 --- libxml2-2.13.0/xmlIO.c.orig        2024-06-14 12:32:12.257784372 +0200
 +++ libxml2-2.13.0/xmlIO.c     2024-06-14 19:23:06.355299914 +0200
 --- libxml2-2.13.0/xmlIO.c.orig        2024-06-14 12:32:12.257784372 +0200
 +++ libxml2-2.13.0/xmlIO.c     2024-06-14 19:23:06.355299914 +0200
-@@ -547,6 +547,27 @@
+@@ -547,6 +547,29 @@
      fd = open(filename, flags, 0777);
  #endif /* WIN32 */
  
      fd = open(filename, flags, 0777);
  #endif /* WIN32 */
  
++#ifdef LIBXML_ZLIB_ENABLED
 +    if (fd < 0 && errno == ENOENT) {
 +        /* If we cannot open `foo.xml', we try `foo.xml.gz'. However we i
 +         * append .gz only if filename doesn't alreay end with .gz. */
 +    if (fd < 0 && errno == ENOENT) {
 +        /* If we cannot open `foo.xml', we try `foo.xml.gz'. However we i
 +         * append .gz only if filename doesn't alreay end with .gz. */
@@ -25,6 +26,7 @@
 +        }
 +    }
 +
 +        }
 +    }
 +
++#endif /* LIBXML_ZLIB_ENABLED */
      if (fd < 0) {
          /*
           * Windows and possibly other platforms return EINVAL
      if (fd < 0) {
          /*
           * Windows and possibly other platforms return EINVAL
This page took 0.059603 seconds and 4 git commands to generate.