diff options
author | Michael Tokarev | 2012-12-31 12:30:31 +0100 |
---|---|---|
committer | Anthony Liguori | 2013-01-02 20:32:48 +0100 |
commit | 74e91370beb3fabda515623b4491a8b7a024304a (patch) | |
tree | eef38a473592c876ed2fa4ca9a76c64d07b72a79 /savevm.c | |
parent | disallow -daemonize usage of stdio (curses display, -nographic, -serial stdio... (diff) | |
download | qemu-74e91370beb3fabda515623b4491a8b7a024304a.tar.gz qemu-74e91370beb3fabda515623b4491a8b7a024304a.tar.xz qemu-74e91370beb3fabda515623b4491a8b7a024304a.zip |
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 <util.h>
vs <libutil.h> - 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 <windows.h> (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 <mjt@tls.msk.ru>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'savevm.c')
-rw-r--r-- | savevm.c | 40 |
1 files changed, 1 insertions, 39 deletions
@@ -21,52 +21,15 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#include <unistd.h> -#include <fcntl.h> -#include <time.h> -#include <errno.h> -#include <sys/time.h> -#include <zlib.h> - -/* Needed early for CONFIG_BSD etc. */ + #include "config-host.h" #ifndef _WIN32 -#include <sys/times.h> -#include <sys/wait.h> -#include <termios.h> -#include <sys/mman.h> -#include <sys/ioctl.h> -#include <sys/resource.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <net/if.h> #include <arpa/inet.h> -#include <dirent.h> -#include <netdb.h> -#include <sys/select.h> -#ifdef CONFIG_BSD -#include <sys/stat.h> -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) -#include <libutil.h> -#else -#include <util.h> -#endif -#ifdef __linux__ -#include <pty.h> -#include <malloc.h> -#include <linux/rtc.h> -#endif -#endif #endif #ifdef _WIN32 #include <windows.h> -#include <malloc.h> -#include <sys/timeb.h> -#include <mmsystem.h> -#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" |