diff options
author | Christoph Egger <Christoph.Egger@amd.com> | 2011-05-26 15:55:22 +0100 |
---|---|---|
committer | Christoph Egger <Christoph.Egger@amd.com> | 2011-05-26 15:55:22 +0100 |
commit | beb998ac7642953d2497a66a5ba552f6cd9b3aae (patch) | |
tree | defcda7b8835f1d6d1f50137cdb7e85c41fae2a0 /tools/libxl/libxl_exec.c | |
parent | 393375e7271d4a5576ad740a304f9874d6958990 (diff) | |
download | xen-beb998ac7642953d2497a66a5ba552f6cd9b3aae.tar.gz xen-beb998ac7642953d2497a66a5ba552f6cd9b3aae.tar.bz2 xen-beb998ac7642953d2497a66a5ba552f6cd9b3aae.zip |
libxl: fix build failure (unused variables) for non-Linux platforms
Move variable definitions into Linux-specific sections where they are
actually used. Fixes warning about unused variables.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_exec.c')
-rw-r--r-- | tools/libxl/libxl_exec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/libxl/libxl_exec.c b/tools/libxl/libxl_exec.c index 27fd6cd600..87715c6501 100644 --- a/tools/libxl/libxl_exec.c +++ b/tools/libxl/libxl_exec.c @@ -41,8 +41,6 @@ static void check_open_fds(const char *what) const char *env_debug; int debug; int i, flags, badness = 0; - char path[PATH_MAX]; - char link[PATH_MAX+1]; env_debug = getenv("_LIBXL_DEBUG_EXEC_FDS"); if (!env_debug) return; @@ -53,6 +51,8 @@ static void check_open_fds(const char *what) for (i = 4; i < 256; i++) { #ifdef __linux__ size_t len; + char path[PATH_MAX]; + char link[PATH_MAX+1]; #endif flags = fcntl(i, F_GETFD); if ( flags == -1 ) { |