qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] meson: reenable filemonitor-inotify compilation
@ 2022-01-07 13:35 Volker Rümelin
  2022-01-07 18:49 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Volker Rümelin @ 2022-01-07 13:35 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

Reenable util/filemonitor-inotify compilation. Compilation was
disabled when commit a620fbe9ac ("configure: convert compiler tests
to meson, part 5") moved CONFIG_INOTIFY1 from config-host.mak to
config-host.h.

This fixes the usb-mtp device and reenables test-util-filemonitor.

Fixes: a620fbe9ac ("configure: convert compiler tests to meson, part 5")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/800
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
---
 tests/unit/meson.build | 2 +-
 util/meson.build       | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/unit/meson.build b/tests/unit/meson.build
index 90acf5b0da..64a5e7bfde 100644
--- a/tests/unit/meson.build
+++ b/tests/unit/meson.build
@@ -129,7 +129,7 @@ if have_system
     'test-vmstate': [migration, io],
     'test-yank': ['socket-helpers.c', qom, io, chardev]
   }
-  if 'CONFIG_INOTIFY1' in config_host
+  if config_host_data.get('CONFIG_INOTIFY1')
     tests += {'test-util-filemonitor': []}
   endif
 
diff --git a/util/meson.build b/util/meson.build
index 05b593055a..71543e1a85 100644
--- a/util/meson.build
+++ b/util/meson.build
@@ -83,7 +83,10 @@ if have_block
   util_ss.add(files('readline.c'))
   util_ss.add(files('throttle.c'))
   util_ss.add(files('timed-average.c'))
-  util_ss.add(when: 'CONFIG_INOTIFY1', if_true: files('filemonitor-inotify.c'),
-                                        if_false: files('filemonitor-stub.c'))
+  if config_host_data.get('CONFIG_INOTIFY1')
+    util_ss.add(files('filemonitor-inotify.c'))
+  else
+    util_ss.add(files('filemonitor-stub.c'))
+  endif
   util_ss.add(when: 'CONFIG_LINUX', if_true: files('vfio-helpers.c'))
 endif
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] meson: reenable filemonitor-inotify compilation
  2022-01-07 13:35 [PATCH] meson: reenable filemonitor-inotify compilation Volker Rümelin
@ 2022-01-07 18:49 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2022-01-07 18:49 UTC (permalink / raw)
  To: Volker Rümelin; +Cc: qemu-devel

On 1/7/22 14:35, Volker Rümelin wrote:
> Reenable util/filemonitor-inotify compilation. Compilation was
> disabled when commit a620fbe9ac ("configure: convert compiler tests
> to meson, part 5") moved CONFIG_INOTIFY1 from config-host.mak to
> config-host.h.
> 
> This fixes the usb-mtp device and reenables test-util-filemonitor.
> 
> Fixes: a620fbe9ac ("configure: convert compiler tests to meson, part 5")
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/800
> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
> ---
>   tests/unit/meson.build | 2 +-
>   util/meson.build       | 7 +++++--
>   2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/unit/meson.build b/tests/unit/meson.build
> index 90acf5b0da..64a5e7bfde 100644
> --- a/tests/unit/meson.build
> +++ b/tests/unit/meson.build
> @@ -129,7 +129,7 @@ if have_system
>       'test-vmstate': [migration, io],
>       'test-yank': ['socket-helpers.c', qom, io, chardev]
>     }
> -  if 'CONFIG_INOTIFY1' in config_host
> +  if config_host_data.get('CONFIG_INOTIFY1')
>       tests += {'test-util-filemonitor': []}
>     endif
>   
> diff --git a/util/meson.build b/util/meson.build
> index 05b593055a..71543e1a85 100644
> --- a/util/meson.build
> +++ b/util/meson.build
> @@ -83,7 +83,10 @@ if have_block
>     util_ss.add(files('readline.c'))
>     util_ss.add(files('throttle.c'))
>     util_ss.add(files('timed-average.c'))
> -  util_ss.add(when: 'CONFIG_INOTIFY1', if_true: files('filemonitor-inotify.c'),
> -                                        if_false: files('filemonitor-stub.c'))
> +  if config_host_data.get('CONFIG_INOTIFY1')
> +    util_ss.add(files('filemonitor-inotify.c'))
> +  else
> +    util_ss.add(files('filemonitor-stub.c'))
> +  endif
>     util_ss.add(when: 'CONFIG_LINUX', if_true: files('vfio-helpers.c'))
>   endif

Queued, thanks.

Paolo


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-07 20:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-07 13:35 [PATCH] meson: reenable filemonitor-inotify compilation Volker Rümelin
2022-01-07 18:49 ` 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).