From: Christoph Egger Subject: [PATCH] tools: build fix for blktap2 Date: Thu, 4 Feb 2010 12:38:03 +0100 Message-ID: <201002041238.03896.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_bGraLk2x8SNc8Y1" 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=_bGraLk2x8SNc8Y1 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi! Attached patch makes blktap2 build again. Signed-off-by: Christoph Egger -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 --Boundary-00=_bGraLk2x8SNc8Y1 Content-Type: text/x-diff; charset="iso 8859-15"; name="xen_tools_blktap2.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_tools_blktap2.diff" diff -r e15391c2e6f1 tools/blktap2/drivers/tapdisk-queue.c --- a/tools/blktap2/drivers/tapdisk-queue.c Thu Feb 04 12:13:30 2010 +0100 +++ b/tools/blktap2/drivers/tapdisk-queue.c Thu Feb 04 12:38:09 2010 +0100 @@ -284,11 +284,14 @@ struct lio { #define LIO_FLAG_EVENTFD (1<<0) +#if defined(__linux__) +/* XXX abstraction violation: move this into a linux specific file */ static int tapdisk_lio_check_resfd(void) { return tapdisk_linux_version() >= KERNEL_VERSION(2, 6, 22); } +#endif static void tapdisk_lio_destroy_aio(struct tqueue *queue) @@ -372,8 +375,11 @@ tapdisk_lio_setup_aio(struct tqueue *que * if not, fall back to the poll fd patch. */ +#if defined(__linux__) +/* XXX abstraction violation: move this into a linux specific file */ err = !tapdisk_lio_check_resfd(); if (!err) +#endif err = __lio_setup_aio_eventfd(queue, qlen); if (err) err = __lio_setup_aio_poll(queue, qlen); --Boundary-00=_bGraLk2x8SNc8Y1 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=_bGraLk2x8SNc8Y1--