From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIXU3-0001ti-Md for qemu-devel@nongnu.org; Wed, 26 Feb 2014 00:56:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIXTx-00088V-O3 for qemu-devel@nongnu.org; Wed, 26 Feb 2014 00:56:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:62851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIXTx-00088N-FY for qemu-devel@nongnu.org; Wed, 26 Feb 2014 00:56:37 -0500 From: Fam Zheng Date: Wed, 26 Feb 2014 13:56:44 +0800 Message-Id: <1393394204-16632-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH] modules: Fix building with --enable-modules List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Peter Maydell Compiling util/modules.c with modules enabled fails now. Fix it by: 1) Add "#define CONFIG_MODULES" with --enable-modules 2) Include qemu-common.h before #ifdef testing in module.c. Signed-off-by: Fam Zheng --- scripts/create_config | 3 +++ util/module.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/create_config b/scripts/create_config index 546f889..a0654c6 100755 --- a/scripts/create_config +++ b/scripts/create_config @@ -30,6 +30,9 @@ case $line in value=${line#*=} echo "#define CONFIG_IASL $value" ;; + CONFIG_MODULES=y) + echo "#define CONFIG_MODULES 1" + ;; CONFIG_AUDIO_DRIVERS=*) drivers=${line#*=} echo "#define CONFIG_AUDIO_DRIVERS \\" diff --git a/util/module.c b/util/module.c index dc08c16..863a8a3 100644 --- a/util/module.c +++ b/util/module.c @@ -14,10 +14,10 @@ */ #include +#include "qemu-common.h" #ifdef CONFIG_MODULES #include #endif -#include "qemu-common.h" #include "qemu/queue.h" #include "qemu/module.h" -- 1.9.0