--- /dev/null
+#--- 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)
# 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
%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