linux-qubasis
linux oasis port as a qubes template
git clone https://9o.is/git/linux-qubasis.git
0008-Use-alloca-if-VLAs-aren-t-supported.patch
(646B)
1 From 7943a7c1c795a1ffe79b2898eb4860cec60dec23 Mon Sep 17 00:00:00 2001
2 From: Michael Forney <mforney@mforney.org>
3 Date: Mon, 24 Jun 2019 23:54:21 -0700
4 Subject: [PATCH] Use alloca if VLAs aren't supported
5
6 ---
7 lib/path.c | 4 ++++
8 1 file changed, 4 insertions(+)
9
10 diff --git a/lib/path.c b/lib/path.c
11 index 75fa85305..af90261a6 100644
12 --- a/lib/path.c
13 +++ b/lib/path.c
14 @@ -982,7 +982,11 @@ static int ul_path_cpuparse(struct path_cxt *pc, cpu_set_t **set, int maxcpus, i
15 {
16 FILE *f;
17 size_t setsize, len = maxcpus * 7;
18 +#ifndef __STDC_NO_VLA__
19 char buf[len];
20 +#else
21 + char *buf = alloca(len);
22 +#endif
23 int rc;
24
25 *set = NULL;
26 --
27 2.28.0
28