From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: [RESEND][PATCH] Fix external module build for 2.6.22 Date: Thu, 11 Sep 2008 17:28:52 +0200 Message-ID: <48C93934.1000300@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: Avi Kivity To: kvm-devel Return-path: Received: from lizzard.sbs.de ([194.138.37.39]:21587 "EHLO lizzard.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756213AbYIKP26 (ORCPT ); Thu, 11 Sep 2008 11:28:58 -0400 Sender: kvm-owner@vger.kernel.org List-ID: Signed-off-by: Jan Kiszka diff --git a/kernel/external-module-compat-comm.h b/kernel/external-module-compat-comm.h index 2e87c57..6072fde 100644 --- a/kernel/external-module-compat-comm.h +++ b/kernel/external-module-compat-comm.h @@ -517,6 +517,11 @@ static inline int cancel_work_sync(struct work_struct *work) return 0; } +/* ... and it returned void before 2.6.23 */ +#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23) + +#define cancel_work_sync(work) ({ cancel_work_sync(work); 0; }) + #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)