I receive the following errors when trying to run "make" on Ubuntu 20.04.1 LTS:
root@simon:/opt/ts3init# make
make -C src;
make[1]: Entering directory '/opt/ts3init/src'
make -C /lib/modules/5.4.0-58-generic/build M=$PWD;
make[2]: Entering directory '/usr/src/linux-headers-5.4.0-58-generic'
AR /opt/ts3init/src/built-in.a
CC [M] /opt/ts3init/src/ts3init_module.o
CC [M] /opt/ts3init/src/ts3init_match.o
/opt/ts3init/src/ts3init_match.c: In function ‘ts3init_get_cookie_mt’:
/opt/ts3init/src/ts3init_match.c:201:9: warning: ISO C90 forbids variable length array ‘payload_buf’ [-Wvla]
201 | __u8 *payload, payload_buf[ts3init_payload_sizes[COMMAND_GET_COOKIE]];
| ^~~~
/opt/ts3init/src/ts3init_match.c: In function ‘ts3init_get_puzzle_mt’:
/opt/ts3init/src/ts3init_match.c:267:9: warning: ISO C90 forbids variable length array ‘payload_buf’ [-Wvla]
267 | __u8 *payload, payload_buf[ts3init_payload_sizes[COMMAND_GET_PUZZLE]];
| ^~~~
CC [M] /opt/ts3init/src/ts3init_cookie.o
/opt/ts3init/src/ts3init_cookie.c: In function ‘check_update_seed_cache’:
/opt/ts3init/src/ts3init_cookie.c:61:14: error: ‘struct shash_desc’ has no member named ‘flags’
61 | shash->flags = 0;
| ^~
make[3]: *** [scripts/Makefile.build:275: /opt/ts3init/src/ts3init_cookie.o] Error 1
make[2]: *** [Makefile:1757: /opt/ts3init/src] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-5.4.0-58-generic'
make[1]: *** [Makefile:10: all] Error 2
make[1]: Leaving directory '/opt/ts3init/src'
make: *** [Makefile:2: all] Error 2
root@simon:/opt/ts3init#
After Googling, I can get around the "ISO C90 forbids variable length array" issue by adding -std=c99 as a switch on the gcc lines in Makefile.xtables. However, I don't know how to fix error: ‘struct shash_desc’ has no member named ‘flags’ error.
Hello,
I receive the following errors when trying to run "make" on Ubuntu 20.04.1 LTS:
After Googling, I can get around the "ISO C90 forbids variable length array" issue by adding
-std=c99
as a switch on thegcc
lines inMakefile.xtables
. However, I don't know how to fixerror: ‘struct shash_desc’ has no member named ‘flags’
error.Any advice appreciated.
Thanks in advance,
Simon