]> git.pld-linux.org Git - packages/ploop.git/commitdiff
- added gcc patch (workaround over-zelous gcc 8+ warning) auto/th/ploop-8.0.14-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 28 Jun 2020 19:31:57 +0000 (21:31 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 28 Jun 2020 19:31:57 +0000 (21:31 +0200)
ploop-gcc.patch [new file with mode: 0644]
ploop.spec

diff --git a/ploop-gcc.patch b/ploop-gcc.patch
new file mode 100644 (file)
index 0000000..62391ed
--- /dev/null
@@ -0,0 +1,53 @@
+#--- ploop-8.0.14/lib/xml.c.orig       2020-06-19 13:24:40.000000000 +0200
+#+++ ploop-8.0.14/lib/xml.c    2020-06-28 14:39:06.351261541 +0200
+#@@ -554,7 +554,15 @@
+#      }
+#      root_element = xmlDocGetRootElement(doc);
+# 
+#+#if __GNUC__ >= 8
+#+#  pragma GCC diagnostic push
+#+#  pragma GCC diagnostic ignored "-Wstringop-truncation"
+#+     /* disable "specified bound ... equals destination size", which is OK here */
+#+#endif
+#      get_basedir(fname, basedir, sizeof(basedir));
+#+#if __GNUC__ >= 8
+#+#  pragma GCC diagnostic pop
+#+#endif
+#      ret = parse_xml(basedir, root_element, di);
+#      if (ret == 0)
+#              ret = validate_disk_descriptor(di);
+#@@ -697,7 +697,16 @@
+#      if (di->runtime->xml_fname == NULL)
+#              di->runtime->xml_fname = strdup(fname);
+# 
+#+#if __GNUC__ >= 8
+#+#  pragma GCC diagnostic push
+#+#  pragma GCC diagnostic ignored "-Wstringop-truncation"
+#+     /* disable "specified bound ... equals destination size", which is OK here */
+#+#endif
+#      get_basedir(fname, tmp, sizeof(tmp));
+#+#if __GNUC__ >= 8
+#+#  pragma GCC diagnostic pop
+#+#endif
+#+
+#      if (tmp[0] == '\0')
+#              strcpy(tmp, "./");
+# 
+--- ploop-8.0.14/lib/xml.c.orig        2020-06-28 15:30:04.941218766 +0200
++++ ploop-8.0.14/lib/xml.c     2020-06-28 20:57:50.857172796 +0200
+@@ -433,7 +433,15 @@
+ {
+       char *p;
++#if __GNUC__ >= 8
++#  pragma GCC diagnostic push
++#  pragma GCC diagnostic ignored "-Wstringop-truncation"
++      /* disable "specified bound ... equals destination size", which is OK here */
++#endif
+       strncpy(out, fname, len);
++#if __GNUC__ >= 8
++#  pragma GCC diagnostic pop
++#endif
+       p = strrchr(out, '/');
+       if (p != NULL)
index 1ed8850ca4f268dfd4c18b2d3729923a8e5b7058..26cb0483e444aa31ca59fc51b90bd9ddb610c5f0 100644 (file)
@@ -10,6 +10,7 @@ Source0:      https://github.com/OpenVZ/ploop/archive/v%{version}/%{name}-%{version}.
 # Source0-md5: 76bc12dd67ed9201d02bc156fbb6a17a
 Patch0:                %{name}-types.patch
 Patch1:                %{name}-python.patch
+Patch2:                %{name}-gcc.patch
 URL:           https://wiki.openvz.org/Ploop
 BuildRequires: libxml2-devel >= 2.0
 BuildRequires: python3-devel >= 1:3.2
@@ -94,6 +95,7 @@ Interfejs Pythona 3 do biblioteki ploop.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 # honour %{_libexecdir} whatever it's set to
 %{__sed} -i -e '/exe = / s,/usr/libexec,%{_libexecdir},' scripts/crypthelper
This page took 0.082316 seconds and 4 git commands to generate.