[dpdk-dev] [PATCH 2/2] vhost: fix build error caused by 64bit print formatting
David Marchand
david.marchand at redhat.com
Thu Aug 15 08:53:00 CEST 2019
On Wed, Aug 14, 2019 at 8:37 PM David Christensen
<drc at linux.vnet.ibm.com> wrote:
>
> Use of %llx print formatting causes meson build error on Power systems with
> RHEL 7.6 and gcc 4.8.5. Replace with PRIx64 macro.
>
> Fixes: 9b62e2da1844 (vhost: register new regions with userfaultfd)
> Cc: maxime.coquelin at redhat.com
>
> Signed-off-by: David Christensen <drc at linux.vnet.ibm.com>
> ---
> lib/librte_vhost/vhost_user.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
> index 0b72648..6a6d694 100644
> --- a/lib/librte_vhost/vhost_user.c
> +++ b/lib/librte_vhost/vhost_user.c
> @@ -1086,10 +1086,11 @@
> goto err_mmap;
> }
> RTE_LOG(INFO, VHOST_CONFIG,
> - "\t userfaultfd registered for range : %llx - %llx\n",
> - reg_struct.range.start,
> - reg_struct.range.start +
> - reg_struct.range.len - 1);
> + "\t userfaultfd registered for range : "
> + "%" PRIx64 " - %" PRIx64 "\n",
> + (uint64_t)reg_struct.range.start,
> + (uint64_t)reg_struct.range.start +
> + (uint64_t)reg_struct.range.len - 1);
struct uffdio_register {
struct uffdio_range range;
...
struct uffdio_range {
__u64 start;
__u64 len;
};
You can drop those casts.
--
David Marchand
More information about the dev
mailing list