# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1281705956 -3600
# Node ID b991ed313c73e0be7e1ebde0804296f502d62b41
# Parent 85bd0f6e8fedf7816883e3b568dbe26c164d63c3
libxc: disable xc_ptrace on x86 Linux
It has been unused since 21732:eb34666befcc.
Removing the include of sys/ptrace.h and threaddb.h exposed a few
places which were using time(2) or gettimeofday(2) without including
time.h or sys/time.h respectively and were relying on an include.
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
tools/console/daemon/io.c | 2 +-
tools/libxc/Makefile | 2 +-
tools/libxc/xc_ptrace.h | 2 ++
tools/libxc/xenctrl.h | 2 +-
tools/libxl/libxl.c | 1 +
tools/libxl/xl.c | 2 +-
tools/libxl/xl_cmdimpl.c | 3 ++-
tools/python/xen/lowlevel/checkpoint/libcheckpoint.c | 2 +-
tools/xenpaging/xenpaging.c | 1 +
9 files changed, 11 insertions(+), 6 deletions(-)
diff -r 85bd0f6e8fed -r b991ed313c73 tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Fri Aug 13 13:55:51 2010 +0100
+++ b/tools/console/daemon/io.c Fri Aug 13 14:25:56 2010 +0100
@@ -34,7 +34,7 @@
#include <termios.h>
#include <stdarg.h>
#include <sys/mman.h>
-#include <sys/time.h>
+#include <time.h>
#include <assert.h>
#if defined(__NetBSD__) || defined(__OpenBSD__)
#include <util.h>
diff -r 85bd0f6e8fed -r b991ed313c73 tools/libxc/Makefile
--- a/tools/libxc/Makefile Fri Aug 13 13:55:51 2010 +0100
+++ b/tools/libxc/Makefile Fri Aug 13 14:25:56 2010 +0100
@@ -32,7 +32,7 @@ CTRL_SRCS-$(CONFIG_X86) += xc_pagetab.c
CTRL_SRCS-$(CONFIG_X86) += xc_pagetab.c
CTRL_SRCS-$(CONFIG_Linux) += xc_linux.c
CTRL_SRCS-$(CONFIG_SunOS) += xc_solaris.c
-CTRL_SRCS-$(CONFIG_X86_Linux) += xc_ptrace.c xc_ptrace_core.c
+#CTRL_SRCS-$(CONFIG_X86_Linux) += xc_ptrace.c xc_ptrace_core.c
CTRL_SRCS-$(CONFIG_NetBSD) += xc_netbsd.c
CTRL_SRCS-$(CONFIG_MiniOS) += xc_minios.c
diff -r 85bd0f6e8fed -r b991ed313c73 tools/libxc/xc_ptrace.h
--- a/tools/libxc/xc_ptrace.h Fri Aug 13 13:55:51 2010 +0100
+++ b/tools/libxc/xc_ptrace.h Fri Aug 13 14:25:56 2010 +0100
@@ -1,3 +1,5 @@
+#error xc_ptrace is disabled.
+
#ifndef XC_PTRACE_
#define XC_PTRACE_
diff -r 85bd0f6e8fed -r b991ed313c73 tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h Fri Aug 13 13:55:51 2010 +0100
+++ b/tools/libxc/xenctrl.h Fri Aug 13 14:25:56 2010 +0100
@@ -150,7 +150,7 @@ typedef struct xc_core_header {
#define XC_CORE_MAGIC 0xF00FEBED
#define XC_CORE_MAGIC_HVM 0xF00FEBEE
-#ifdef __linux__
+#if 0 /*def __linux__*/
#include <sys/ptrace.h>
#include <thread_db.h>
diff -r 85bd0f6e8fed -r b991ed313c73 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c Fri Aug 13 13:55:51 2010 +0100
+++ b/tools/libxl/libxl.c Fri Aug 13 14:25:56 2010 +0100
@@ -25,6 +25,7 @@
#include <sys/select.h>
#include <sys/mman.h>
#include <sys/wait.h>
+#include <sys/time.h>
#include <signal.h>
#include <unistd.h> /* for write, unlink and close */
#include <stdint.h>
diff -r 85bd0f6e8fed -r b991ed313c73 tools/libxl/xl.c
--- a/tools/libxl/xl.c Fri Aug 13 13:55:51 2010 +0100
+++ b/tools/libxl/xl.c Fri Aug 13 14:25:56 2010 +0100
@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <sys/time.h> /* for time */
+#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
diff -r 85bd0f6e8fed -r b991ed313c73 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c Fri Aug 13 13:55:51 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c Fri Aug 13 14:25:56 2010 +0100
@@ -21,10 +21,11 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <sys/time.h> /* for time */
+#include <time.h>
#include <getopt.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/time.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/socket.h>
diff -r 85bd0f6e8fed -r b991ed313c73
tools/python/xen/lowlevel/checkpoint/libcheckpoint.c
--- a/tools/python/xen/lowlevel/checkpoint/libcheckpoint.c Fri Aug 13
13:55:51 2010 +0100
+++ b/tools/python/xen/lowlevel/checkpoint/libcheckpoint.c Fri Aug 13
14:25:56 2010 +0100
@@ -4,7 +4,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <time.h>
+#include <sys/time.h>
#include <signal.h>
#include <sys/stat.h>
#include <unistd.h>
diff -r 85bd0f6e8fed -r b991ed313c73 tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c Fri Aug 13 13:55:51 2010 +0100
+++ b/tools/xenpaging/xenpaging.c Fri Aug 13 14:25:56 2010 +0100
@@ -23,6 +23,7 @@
#include <inttypes.h>
#include <stdlib.h>
#include <stdarg.h>
+#include <time.h>
#include <xc_private.h>
#include <xen/mem_event.h>
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|