[PATCH] meson: fix vstorage driver build

Nikolay Shirokovskiy posted 1 patch 3 years, 3 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1610971363-719546-1-git-send-email-nshirokovskiy@virtuozzo.com
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] meson: fix vstorage driver build
Posted by Nikolay Shirokovskiy 3 years, 3 months ago
It breaks on using - in VSTORAGE-MOUNT definition with:

  In file included from ../config.h:19:0,
  from ../src/util/viraudit.c:22:
  ./meson-config.h:180:17: error: ISO C99 requires whitespace after the macro name [-Werror]
  #define VSTORAGE-MOUNT "/usr/bin/vstorage-mount"
  ^
  ./meson-config.h:180:0: error: "VSTORAGE" redefined [-Werror]
  #define VSTORAGE-MOUNT "/usr/bin/vstorage-mount"
  ^
  ./meson-config.h:178:0: note: this is the location of the previous definition
  #define VSTORAGE "/usr/bin/vstorage"
  ^
  #define VSTORAGE-MOUNT "/usr/bin/vstorage-mount"
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index b5277b4..aff2565 100644
--- a/meson.build
+++ b/meson.build
@@ -1974,7 +1974,7 @@ if conf.has('WITH_LIBVIRTD')
       conf.set('WITH_STORAGE_VSTORAGE', 1)
       foreach name : ['vstorage', 'vstorage-mount', 'umount']
         path = get_variable('@0@_prog'.format(name.underscorify())).path()
-        conf.set_quoted(name.to_upper(), path)
+        conf.set_quoted(name.underscorify().to_upper(), path)
       endforeach
     endif
   endif
-- 
1.8.3.1

Re: [PATCH] meson: fix vstorage driver build
Posted by Nikolay Shirokovskiy 3 years, 3 months ago
This patch is outdated by
https://www.redhat.com/archives/libvir-list/2021-January/msg00778.html

On Mon, Jan 18, 2021 at 3:02 PM Nikolay Shirokovskiy <
nshirokovskiy@virtuozzo.com> wrote:

> It breaks on using - in VSTORAGE-MOUNT definition with:
>
>   In file included from ../config.h:19:0,
>   from ../src/util/viraudit.c:22:
>   ./meson-config.h:180:17: error: ISO C99 requires whitespace after the
> macro name [-Werror]
>   #define VSTORAGE-MOUNT "/usr/bin/vstorage-mount"
>   ^
>   ./meson-config.h:180:0: error: "VSTORAGE" redefined [-Werror]
>   #define VSTORAGE-MOUNT "/usr/bin/vstorage-mount"
>   ^
>   ./meson-config.h:178:0: note: this is the location of the previous
> definition
>   #define VSTORAGE "/usr/bin/vstorage"
>   ^
>   #define VSTORAGE-MOUNT "/usr/bin/vstorage-mount"
> ---
>  meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meson.build b/meson.build
> index b5277b4..aff2565 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1974,7 +1974,7 @@ if conf.has('WITH_LIBVIRTD')
>        conf.set('WITH_STORAGE_VSTORAGE', 1)
>        foreach name : ['vstorage', 'vstorage-mount', 'umount']
>          path = get_variable('@0@
> _prog'.format(name.underscorify())).path()
> -        conf.set_quoted(name.to_upper(), path)
> +        conf.set_quoted(name.underscorify().to_upper(), path)
>        endforeach
>      endif
>    endif
> --
> 1.8.3.1
>
>