* [Buildroot] [PATCH 1/1] package/xen: fix build with gcc 11
@ 2021-08-06 21:25 Fabrice Fontaine
2021-08-07 8:47 ` Yann E. MORIN
0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2021-08-06 21:25 UTC (permalink / raw)
To: buildroot; +Cc: Alistair Francis, Matt Weber, Fabrice Fontaine
Fix the following build failure with gcc 11:
linux.c:165:50: error: argument 7 of type 'const xen_pfn_t[]' {aka 'const long long unsigned int[]'} declared as an ordinary array [-Werror=vla-parameter]
165 | const xen_pfn_t arr[/*num*/], int err[/*num*/])
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from linux.c:29:
private.h:35:50: note: previously declared as a variable length array 'const xen_pfn_t[num]' {aka 'const long long unsigned int[num]'}
35 | const xen_pfn_t arr[num], int err[num]);
| ~~~~~~~~~~~~~~~~^~~~~~~~
Fixes:
- http://autobuild.buildroot.org/results/f70d060cf50254694113f19f50a8ef96ef33dd1a
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...osdep_xenforeignmemory_map-prototype.patch | 33 +++++++++++++++++++
1 file changed, 33 insertions(+)
create mode 100644 package/xen/0002-libs-foreignmemory-Fix-osdep_xenforeignmemory_map-prototype.patch
diff --git a/package/xen/0002-libs-foreignmemory-Fix-osdep_xenforeignmemory_map-prototype.patch b/package/xen/0002-libs-foreignmemory-Fix-osdep_xenforeignmemory_map-prototype.patch
new file mode 100644
index 0000000000..170d1c22c2
--- /dev/null
+++ b/package/xen/0002-libs-foreignmemory-Fix-osdep_xenforeignmemory_map-prototype.patch
@@ -0,0 +1,33 @@
+From 5d3e4ebb5c71477d74a0c503438545a0126d3863 Mon Sep 17 00:00:00 2001
+From: Anthony PERARD <anthony.perard@citrix.com>
+Date: Tue, 1 Jun 2021 16:41:47 +0100
+Subject: [PATCH] libs/foreignmemory: Fix osdep_xenforeignmemory_map prototype
+
+Commit cf8c4d3d13b8 made some preparation to have one day
+variable-length-array argument, but didn't declare the array in the
+function prototype the same way as in the function definition. And now
+GCC 11 complains about it.
+
+Fixes: cf8c4d3d13b8 ("tools/libs/foreignmemory: pull array length argument to map forward")
+Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
+Reviewed-by: Jan Beulich <jbeulich@suse.com>
+[Retrieved from:
+https://github.com/xen-project/xen/commit/5d3e4ebb5c71477d74a0c503438545a0126d3863]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ tools/libs/foreignmemory/private.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/libs/foreignmemory/private.h b/tools/libs/foreignmemory/private.h
+index 1ee3626dd278..5bb0cefb0987 100644
+--- a/tools/libs/foreignmemory/private.h
++++ b/tools/libs/foreignmemory/private.h
+@@ -32,7 +32,7 @@ int osdep_xenforeignmemory_close(xenforeignmemory_handle *fmem);
+ void *osdep_xenforeignmemory_map(xenforeignmemory_handle *fmem,
+ uint32_t dom, void *addr,
+ int prot, int flags, size_t num,
+- const xen_pfn_t arr[num], int err[num]);
++ const xen_pfn_t arr[/*num*/], int err[/*num*/]);
+ int osdep_xenforeignmemory_unmap(xenforeignmemory_handle *fmem,
+ void *addr, size_t num);
+
--
2.30.2
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/xen: fix build with gcc 11
2021-08-06 21:25 [Buildroot] [PATCH 1/1] package/xen: fix build with gcc 11 Fabrice Fontaine
@ 2021-08-07 8:47 ` Yann E. MORIN
0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2021-08-07 8:47 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Alistair Francis, Matt Weber, buildroot
Fabrice, All,
On 2021-08-06 23:25 +0200, Fabrice Fontaine spake thusly:
> Fix the following build failure with gcc 11:
>
> linux.c:165:50: error: argument 7 of type 'const xen_pfn_t[]' {aka 'const long long unsigned int[]'} declared as an ordinary array [-Werror=vla-parameter]
> 165 | const xen_pfn_t arr[/*num*/], int err[/*num*/])
> | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
> In file included from linux.c:29:
> private.h:35:50: note: previously declared as a variable length array 'const xen_pfn_t[num]' {aka 'const long long unsigned int[num]'}
> 35 | const xen_pfn_t arr[num], int err[num]);
> | ~~~~~~~~~~~~~~~~^~~~~~~~
>
> Fixes:
> - http://autobuild.buildroot.org/results/f70d060cf50254694113f19f50a8ef96ef33dd1a
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> ...osdep_xenforeignmemory_map-prototype.patch | 33 +++++++++++++++++++
> 1 file changed, 33 insertions(+)
> create mode 100644 package/xen/0002-libs-foreignmemory-Fix-osdep_xenforeignmemory_map-prototype.patch
>
> diff --git a/package/xen/0002-libs-foreignmemory-Fix-osdep_xenforeignmemory_map-prototype.patch b/package/xen/0002-libs-foreignmemory-Fix-osdep_xenforeignmemory_map-prototype.patch
> new file mode 100644
> index 0000000000..170d1c22c2
> --- /dev/null
> +++ b/package/xen/0002-libs-foreignmemory-Fix-osdep_xenforeignmemory_map-prototype.patch
> @@ -0,0 +1,33 @@
> +From 5d3e4ebb5c71477d74a0c503438545a0126d3863 Mon Sep 17 00:00:00 2001
> +From: Anthony PERARD <anthony.perard@citrix.com>
> +Date: Tue, 1 Jun 2021 16:41:47 +0100
> +Subject: [PATCH] libs/foreignmemory: Fix osdep_xenforeignmemory_map prototype
> +
> +Commit cf8c4d3d13b8 made some preparation to have one day
> +variable-length-array argument, but didn't declare the array in the
> +function prototype the same way as in the function definition. And now
> +GCC 11 complains about it.
> +
> +Fixes: cf8c4d3d13b8 ("tools/libs/foreignmemory: pull array length argument to map forward")
> +Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> +Reviewed-by: Jan Beulich <jbeulich@suse.com>
> +[Retrieved from:
> +https://github.com/xen-project/xen/commit/5d3e4ebb5c71477d74a0c503438545a0126d3863]
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> + tools/libs/foreignmemory/private.h | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/tools/libs/foreignmemory/private.h b/tools/libs/foreignmemory/private.h
> +index 1ee3626dd278..5bb0cefb0987 100644
> +--- a/tools/libs/foreignmemory/private.h
> ++++ b/tools/libs/foreignmemory/private.h
> +@@ -32,7 +32,7 @@ int osdep_xenforeignmemory_close(xenforeignmemory_handle *fmem);
> + void *osdep_xenforeignmemory_map(xenforeignmemory_handle *fmem,
> + uint32_t dom, void *addr,
> + int prot, int flags, size_t num,
> +- const xen_pfn_t arr[num], int err[num]);
> ++ const xen_pfn_t arr[/*num*/], int err[/*num*/]);
> + int osdep_xenforeignmemory_unmap(xenforeignmemory_handle *fmem,
> + void *addr, size_t num);
> +
> --
> 2.30.2
>
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-07 8:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06 21:25 [Buildroot] [PATCH 1/1] package/xen: fix build with gcc 11 Fabrice Fontaine
2021-08-07 8:47 ` Yann E. MORIN
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.