add trivial patch to fix build with PHP 8
This commit is contained in:
parent
070ac54283
commit
d494fdb90a
20
libguestfs-php8.patch
Normal file
20
libguestfs-php8.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
diff -up ./generator/php.ml.php8 ./generator/php.ml
|
||||||
|
--- ./generator/php.ml.php8 2021-03-05 12:58:48.985383761 +0100
|
||||||
|
+++ ./generator/php.ml 2021-03-05 13:00:10.731000947 +0100
|
||||||
|
@@ -98,9 +98,15 @@ and generate_php_c () =
|
||||||
|
|
||||||
|
static int res_guestfs_h;
|
||||||
|
|
||||||
|
+/* removed from PHP 8 */
|
||||||
|
+#ifndef TSRMLS_CC
|
||||||
|
+#define TSRMLS_DC
|
||||||
|
+#define TSRMLS_CC
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#if ZEND_MODULE_API_NO >= 20151012
|
||||||
|
# define GUESTFS_RETURN_STRING(x, duplicate) \\
|
||||||
|
- do { if (duplicate) RETURN_STRING(x) else { RETVAL_STRING(x); efree ((char *)x); return; } } while (0)
|
||||||
|
+ do { if (duplicate) { RETURN_STRING(x); } else { RETVAL_STRING(x); efree ((char *)x); return; } } while (0)
|
||||||
|
# define guestfs_add_assoc_string(arg, key, str, dup) \\
|
||||||
|
add_assoc_string(arg, key, str)
|
||||||
|
# define guestfs_add_assoc_stringl(arg, key, str, len, dup) \\
|
@ -86,6 +86,9 @@ Source7: libguestfs.keyring
|
|||||||
# Maintainer script which helps with handling patches.
|
# Maintainer script which helps with handling patches.
|
||||||
Source8: copy-patches.sh
|
Source8: copy-patches.sh
|
||||||
|
|
||||||
|
# Trivial fix for PHP 8
|
||||||
|
Patch0: %{name}-php8.patch
|
||||||
|
|
||||||
%if 0%{patches_touch_autotools}
|
%if 0%{patches_touch_autotools}
|
||||||
BuildRequires: autoconf, automake, libtool, gettext-devel
|
BuildRequires: autoconf, automake, libtool, gettext-devel
|
||||||
%endif
|
%endif
|
||||||
@ -1308,6 +1311,7 @@ rm ocaml/html/.gitignore
|
|||||||
%changelog
|
%changelog
|
||||||
* Fri Mar 5 2021 Remi Collet <remi@fedoraproject.org> - 1:1.45.1-2
|
* Fri Mar 5 2021 Remi Collet <remi@fedoraproject.org> - 1:1.45.1-2
|
||||||
- rebuild for https://fedoraproject.org/wiki/Changes/php80
|
- rebuild for https://fedoraproject.org/wiki/Changes/php80
|
||||||
|
- add trivial patch to fix build with PHP 8
|
||||||
|
|
||||||
* Wed Mar 3 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.45.1-1
|
* Wed Mar 3 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.45.1-1
|
||||||
- New upstream version 1.45.1.
|
- New upstream version 1.45.1.
|
||||||
|
Loading…
Reference in New Issue
Block a user