From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: libxl: fix build failure for non-Linux platforms Date: Thu, 26 May 2011 11:33:00 +0200 Message-ID: <4DDE1E4C.8030603@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090603000306030209020908" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --------------090603000306030209020908 Content-Type: text/plain; charset="ISO-8859-15"; format=flowed Content-Transfer-Encoding: 7bit Move variable definitions into Linux-specific sections where they are actually used. Fixes warning about unused variables. Signed-off-by: Christoph Egger -- ---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 --------------090603000306030209020908 Content-Type: text/plain; name="xen_tools_libxl.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_tools_libxl.diff" Content-Description: xen_tools_libxl.diff diff -r 87ff9d4de6f0 tools/libxl/libxl_exec.c --- a/tools/libxl/libxl_exec.c Wed May 25 16:04:56 2011 +0200 +++ b/tools/libxl/libxl_exec.c Thu May 26 11:30:41 2011 +0200 @@ -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 ) { --------------090603000306030209020908 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------090603000306030209020908--