aboutsummaryrefslogtreecommitdiff
path: root/src/vmstate.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2022-05-13 16:23:10 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-05-30 00:48:47 +0200
commitd4422354726405530957a23b56001e891998e867 (patch)
tree80a7d00f1b25513208a43e4222dc7df2bc2adeba /src/vmstate.c
parenta70bd5508214e836dbabc8a0fb940e5df34ecb45 (diff)
downloadslirp-d4422354726405530957a23b56001e891998e867.zip
slirp-d4422354726405530957a23b56001e891998e867.tar.gz
slirp-d4422354726405530957a23b56001e891998e867.tar.bz2
vmstate: only enable when building under GNU C
To be able to use typeof. Fixes #60
Diffstat (limited to 'src/vmstate.c')
-rw-r--r--src/vmstate.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vmstate.c b/src/vmstate.c
index 68cc172..c7fc5a3 100644
--- a/src/vmstate.c
+++ b/src/vmstate.c
@@ -45,6 +45,8 @@
#include "stream.h"
#include "vmstate.h"
+#ifdef HAVE_VMSTATE
+
static int get_nullptr(SlirpIStream *f, void *pv, size_t size,
const VMStateField *field)
{
@@ -442,3 +444,5 @@ int slirp_vmstate_load_state(SlirpIStream *f, const VMStateDescription *vmsd,
}
return ret;
}
+
+#endif /* HAVE_VMSTATE */