* [Qemu-devel] [PATCH] modules: Fix building with --enable-modules
@ 2014-02-26 5:56 Fam Zheng
2014-02-26 6:19 ` Hu Tao
2014-02-26 10:25 ` Paolo Bonzini
0 siblings, 2 replies; 3+ messages in thread
From: Fam Zheng @ 2014-02-26 5:56 UTC (permalink / raw)
To: qemu-devel; +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 <famz@redhat.com>
---
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 <stdlib.h>
+#include "qemu-common.h"
#ifdef CONFIG_MODULES
#include <gmodule.h>
#endif
-#include "qemu-common.h"
#include "qemu/queue.h"
#include "qemu/module.h"
--
1.9.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] modules: Fix building with --enable-modules
2014-02-26 5:56 [Qemu-devel] [PATCH] modules: Fix building with --enable-modules Fam Zheng
@ 2014-02-26 6:19 ` Hu Tao
2014-02-26 10:25 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Hu Tao @ 2014-02-26 6:19 UTC (permalink / raw)
To: Fam Zheng; +Cc: Paolo Bonzini, qemu-devel, Peter Maydell
On Wed, Feb 26, 2014 at 01:56:44PM +0800, Fam Zheng wrote:
> 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 <famz@redhat.com>
> ---
> 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 <stdlib.h>
> +#include "qemu-common.h"
So it's moved up here for CONFIG_MODULES. BTW, the stdlib.h line
can be removed since qemu-common.h includes it already.
Reviewed&tested-by: Hu Tao <hutao@cn.fujitsu.com>
> #ifdef CONFIG_MODULES
> #include <gmodule.h>
> #endif
> -#include "qemu-common.h"
> #include "qemu/queue.h"
> #include "qemu/module.h"
>
> --
> 1.9.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] modules: Fix building with --enable-modules
2014-02-26 5:56 [Qemu-devel] [PATCH] modules: Fix building with --enable-modules Fam Zheng
2014-02-26 6:19 ` Hu Tao
@ 2014-02-26 10:25 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2014-02-26 10:25 UTC (permalink / raw)
To: Fam Zheng, qemu-devel; +Cc: Peter Maydell
Il 26/02/2014 06:56, Fam Zheng ha scritto:
> 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 <famz@redhat.com>
> ---
> 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"
> + ;;
Not needed:
CONFIG_*=y) # configuration
name=${line%=*}
echo "#define $name 1"
;;
Paolo
> 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 <stdlib.h>
> +#include "qemu-common.h"
> #ifdef CONFIG_MODULES
> #include <gmodule.h>
> #endif
> -#include "qemu-common.h"
> #include "qemu/queue.h"
> #include "qemu/module.h"
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-26 10:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-26 5:56 [Qemu-devel] [PATCH] modules: Fix building with --enable-modules Fam Zheng
2014-02-26 6:19 ` Hu Tao
2014-02-26 10:25 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).