Fix compilation bug in slirp code
PATCH 1/1 Fix compilation bug in slirp code
Hi,
tcpemu is a global variable (declared in slirp/misc.h). A later "static" declaration raises a compilation error with newer gcc versions. The patch fixes the declaration in slirp/tcp_subr.c.
Regards
Stefan
Index: slirp/tcp_subr.c
===================================================================
RCS file: /sources/qemu/qemu/slirp/tcp_subr.c,v
retrieving revision 1.12
tcp_subr.c +1 -1
@@ -559,7 +559,7 @@ {0, 0, 0, 0} }; -static struct emu_t *tcpemu =0 ; +struct emu_t *tcpemu;/* * Return TOS according to the above table
Quoted 6 lines · Stefan Weil
Hi,
tcpemu is a global variable (declared in
slirp/misc.h). A later "static" declaration raises a compilation error with newer gcc versions. The patch fixes the declaration inslirp/tcp_subr.c.
The only user outside tcp_subr.c in misc.c is disabled with #ifdef CONFIG_QEMU, so I'll fix this by disabling the global definition in misc.h and 'static' keyword in tcp_subr.c with the same #ifdef.
Thanks anyways.