From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: [PATCH] libxc: lzma build fix Date: Wed, 26 Jan 2011 16:22:14 +0100 Message-ID: <201101261622.14583.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_mwDQNQcuvIJI3Dq" 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 --Boundary-00=_mwDQNQcuvIJI3Dq Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi! Attached patch lets libxc build with lzma support on NetBSD. NetBSD doesn't have sysconf(_SC_PHYS_PAGES). Signed-off-by: Christoph Egger -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 --Boundary-00=_mwDQNQcuvIJI3Dq Content-Type: text/x-diff; charset="iso 8859-15"; name="xen_libxc_lzma.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_libxc_lzma.diff" Content-Description: xen_libxc_lzma.diff diff -r fb8a14647f4d -r 48852e88d506 tools/libxc/xc_dom_bzimageloader.c --- a/tools/libxc/xc_dom_bzimageloader.c +++ b/tools/libxc/xc_dom_bzimageloader.c @@ -144,7 +144,11 @@ static uint64_t physmem(void) { uint64_t ret = 0; const long pagesize = sysconf(_SC_PAGESIZE); +#ifdef _SC_PHYS_PAGES const long pages = sysconf(_SC_PHYS_PAGES); +#else + const long pages = -1; +#endif if ( (pagesize != -1) || (pages != -1) ) { --Boundary-00=_mwDQNQcuvIJI3Dq 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 --Boundary-00=_mwDQNQcuvIJI3Dq--