From: Michael Tokarev Date: Mon, 31 Dec 2012 11:30:31 +0000 (+0400) Subject: savevm.c: cleanup system includes X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~2870 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=74e91370beb3fabda515623b4491a8b7a024304a;p=sdk%2Femulator%2Fqemu.git savevm.c: cleanup system includes savevm.c suffers from the same problem as some other files. Some years ago savevm.c was created from vl.c, moving some code from there into a separate file. At that time, all includes were just copied from vl.c to savevm.c, without checking which ones are needed and which are not. But actually most of that stuff is _not_ needed. More, some stuff is wrong, for example, *BSD #ifdef'ery around vs - for one, it fails to build on Debian/kFreebsd. Just remove all this. Maybe there's a possibility to clean it up further - like removing (and maybe including winsock.h for htons etc), and maybe it's possible to remove some internal #includes too, but I didn't check this. While at it, remove duplicate #include of qemu/timer.h. Signed-off-by: Michael Tokarev Signed-off-by: Anthony Liguori --- diff --git a/savevm.c b/savevm.c index bcdb92e..529d60e 100644 --- a/savevm.c +++ b/savevm.c @@ -21,52 +21,15 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#include -#include -#include -#include -#include -#include - -/* Needed early for CONFIG_BSD etc. */ + #include "config-host.h" #ifndef _WIN32 -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include -#ifdef CONFIG_BSD -#include -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) -#include -#else -#include -#endif -#ifdef __linux__ -#include -#include -#include -#endif -#endif #endif #ifdef _WIN32 #include -#include -#include -#include -#define getopt_long_only getopt_long -#define memalign(align, size) malloc(size) #endif #include "qemu-common.h" @@ -80,7 +43,6 @@ #include "migration/migration.h" #include "qemu/sockets.h" #include "qemu/queue.h" -#include "qemu/timer.h" #include "sysemu/cpus.h" #include "exec/memory.h" #include "qmp-commands.h"