summaryrefslogtreecommitdiff
path: root/slirp/slirp.h
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-02-22 22:29:21 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-03-23 00:57:01 +0100
commit67e3eee45460129cbc5a90fb9f74eb52594281cd (patch)
tree1fbd93c803f75e45b926b9883e5a3dc2df84e8f1 /slirp/slirp.h
parentc17c07231e88549169689ffba811e53921e10025 (diff)
downloadqemu-67e3eee45460129cbc5a90fb9f74eb52594281cd.tar.gz
Avoid embedding struct mbuf in other structures
struct mbuf uses a C99 open char array to allow inlining data. Inlining this in another structure is however a GNU extension. The inlines used so far in struct Slirp were actually only needed as head of struct mbuf lists. This replaces these inline with mere struct quehead, and use casts as appropriate. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'slirp/slirp.h')
-rw-r--r--slirp/slirp.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/slirp/slirp.h b/slirp/slirp.h
index 9ad88e7df7..1abbcc6c32 100644
--- a/slirp/slirp.h
+++ b/slirp/slirp.h
@@ -82,6 +82,7 @@ void free(void *ptr);
have different prototypes. */
#define insque slirp_insque
#define remque slirp_remque
+#define quehead slirp_quehead
#ifdef HAVE_SYS_STROPTS_H
#include <sys/stropts.h>
@@ -197,12 +198,13 @@ struct Slirp {
struct ex_list *exec_list;
/* mbuf states */
- struct mbuf m_freelist, m_usedlist;
+ struct quehead m_freelist;
+ struct quehead m_usedlist;
int mbuf_alloced;
/* if states */
- struct mbuf if_fastq; /* fast queue (for interactive data) */
- struct mbuf if_batchq; /* queue for non-interactive data */
+ struct quehead if_fastq; /* fast queue (for interactive data) */
+ struct quehead if_batchq; /* queue for non-interactive data */
struct mbuf *next_m; /* pointer to next mbuf to output */
bool if_start_busy; /* avoid if_start recursion */