Skip to content

Commit

Permalink
vfio: add stdbool include
Browse files Browse the repository at this point in the history
[ upstream commit 31c5af6 ]

This became visible by backporting the following for the 19.11 stable tree:
 c13ca4e "vfio: fix DMA mapping granularity for IOVA as VA"

The usage of type bool in the vfio code would require "#include
<stdbool.h>", but rte_vfio.h has no direct paths to stdbool.h.
It happens that in eal_vfio_mp_sync.c it comes after "#include
<rte_log.h>".

And rte_log.h since 20.05 includes stdbool since this change:
 241e67b "log: add API to check if a logtype can log in a given level"
and thereby mitigates the issue.

It should be safe to include stdbool.h from rte_vfio.h itself
to be present exactly when needed for the struct it defines using that
type.

Fixes: c13ca4e ("vfio: fix DMA mapping granularity for IOVA as VA")

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
  • Loading branch information
cpaelzer authored and bluca committed Jul 12, 2021
1 parent ac656bd commit e2f67db
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/librte_eal/include/rte_vfio.h
Expand Up @@ -14,6 +14,7 @@
extern "C" {
#endif

#include <stdbool.h>
#include <stdint.h>

/*
Expand Down

0 comments on commit e2f67db

Please sign in to comment.