Skip to contentSkip to conversation

libxl: fix build failure for non-Linux platforms

PATCH Christoph Egger 2 participants 2 messages May 26, 2011

lore
Share & tools
lore
#0 lore raw

Move variable definitions into Linux-specific sections where they are actually used. Fixes warning about unused variables.

Signature · 6 lines
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
tools/libxl/libxl_exec.c +2 -2
diff -r 87ff9d4de6f0 tools/libxl/libxl_exec.c
@@ -41,8 +41,6 @@ static void check_open_fds(const char *w
     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 *w
     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 ) {

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel