diff mbox series

[1/5] ui: fix path to dbus-display1.h

Message ID 20220927095921.261760-2-pbonzini@redhat.com
State New
Headers show
Series Small meson updates for QEMU 7.2 | expand

Commit Message

Paolo Bonzini Sept. 27, 2022, 9:59 a.m. UTC
While the source directory is always included in the include path,
the corresponding directory in the build tree is not.  Therefore,
custom_targets (e.g. ui/dbus-display1.h) must be referred to using
the full path.

This avoids a build failure when ui/dbus-chardev.c is not built as
a module:

In file included from ../ui/dbus-chardev.c:32:
../ui/dbus.h:34:10: fatal error: dbus-display1.h: No such file or directory
   34 | #include "dbus-display1.h"
      |          ^~~~~~~~~~~~~~~~~

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 tests/qtest/dbus-display-test.c | 2 +-
 ui/dbus.h                       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Marc-André Lureau Sept. 27, 2022, 10:38 a.m. UTC | #1
On Tue, Sep 27, 2022 at 1:59 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> While the source directory is always included in the include path,
> the corresponding directory in the build tree is not.  Therefore,
> custom_targets (e.g. ui/dbus-display1.h) must be referred to using
> the full path.
>
> This avoids a build failure when ui/dbus-chardev.c is not built as
> a module:
>
> In file included from ../ui/dbus-chardev.c:32:
> ../ui/dbus.h:34:10: fatal error: dbus-display1.h: No such file or directory
>    34 | #include "dbus-display1.h"
>       |          ^~~~~~~~~~~~~~~~~
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

> ---
>  tests/qtest/dbus-display-test.c | 2 +-
>  ui/dbus.h                       | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/qtest/dbus-display-test.c b/tests/qtest/dbus-display-test.c
> index 8be5974763..cb1b62d1d1 100644
> --- a/tests/qtest/dbus-display-test.c
> +++ b/tests/qtest/dbus-display-test.c
> @@ -3,7 +3,7 @@
>  #include <gio/gio.h>
>  #include <gio/gunixfdlist.h>
>  #include "libqtest.h"
> -#include "dbus-display1.h"
> +#include "ui/dbus-display1.h"
>
>  static GDBusConnection*
>  test_dbus_p2p_from_fd(int fd)
> diff --git a/ui/dbus.h b/ui/dbus.h
> index c001c11f70..9c149e7b41 100644
> --- a/ui/dbus.h
> +++ b/ui/dbus.h
> @@ -31,7 +31,7 @@
>  #include "ui/console.h"
>  #include "ui/clipboard.h"
>
> -#include "dbus-display1.h"
> +#include "ui/dbus-display1.h"
>
>  typedef struct DBusClipboardRequest {
>      GDBusMethodInvocation *invocation;
> --
> 2.37.3
>
diff mbox series

Patch

diff --git a/tests/qtest/dbus-display-test.c b/tests/qtest/dbus-display-test.c
index 8be5974763..cb1b62d1d1 100644
--- a/tests/qtest/dbus-display-test.c
+++ b/tests/qtest/dbus-display-test.c
@@ -3,7 +3,7 @@ 
 #include <gio/gio.h>
 #include <gio/gunixfdlist.h>
 #include "libqtest.h"
-#include "dbus-display1.h"
+#include "ui/dbus-display1.h"
 
 static GDBusConnection*
 test_dbus_p2p_from_fd(int fd)
diff --git a/ui/dbus.h b/ui/dbus.h
index c001c11f70..9c149e7b41 100644
--- a/ui/dbus.h
+++ b/ui/dbus.h
@@ -31,7 +31,7 @@ 
 #include "ui/console.h"
 #include "ui/clipboard.h"
 
-#include "dbus-display1.h"
+#include "ui/dbus-display1.h"
 
 typedef struct DBusClipboardRequest {
     GDBusMethodInvocation *invocation;