[v17,1/2] eal: add uuid dependent header files explicitly

Message ID 20200703145718.81017-2-haiyue.wang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series support for VFIO-PCI VF token interface |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/Intel-compilation fail apply issues

Commit Message

Wang, Haiyue July 3, 2020, 2:57 p.m. UTC
  Add the dependent header files explicitly, so that the user just needs
to include the 'rte_uuid.h' header file directly to avoid compile error:
 (1). rte_uuid.h:97:55: error: unknown type name ‘size_t’
 (2). rte_uuid.h:58:2: error: implicit declaration of function ‘memcpy’

Fixes: 6bc67c497a51 ("eal: add uuid API")
Cc: stable@dpdk.org

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
 lib/librte_eal/include/rte_uuid.h | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

David Marchand July 6, 2020, 2:32 p.m. UTC | #1
On Fri, Jul 3, 2020 at 5:05 PM Haiyue Wang <haiyue.wang@intel.com> wrote:
>
> Add the dependent header files explicitly, so that the user just needs
> to include the 'rte_uuid.h' header file directly to avoid compile error:
>  (1). rte_uuid.h:97:55: error: unknown type name ‘size_t’
>  (2). rte_uuid.h:58:2: error: implicit declaration of function ‘memcpy’
>
> Fixes: 6bc67c497a51 ("eal: add uuid API")
> Cc: stable@dpdk.org
>
> Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
> ---
>  lib/librte_eal/include/rte_uuid.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/lib/librte_eal/include/rte_uuid.h b/lib/librte_eal/include/rte_uuid.h
> index 044afbdfa..8b42e070a 100644
> --- a/lib/librte_eal/include/rte_uuid.h
> +++ b/lib/librte_eal/include/rte_uuid.h
> @@ -15,6 +15,8 @@ extern "C" {
>  #endif
>
>  #include <stdbool.h>
> +#include <stddef.h>
> +#include <string.h>
>
>  /**
>   * Struct describing a Universal Unique Identifier
> --
> 2.27.0
>

Acked-by: David Marchand <david.marchand@redhat.com>
  

Patch

diff --git a/lib/librte_eal/include/rte_uuid.h b/lib/librte_eal/include/rte_uuid.h
index 044afbdfa..8b42e070a 100644
--- a/lib/librte_eal/include/rte_uuid.h
+++ b/lib/librte_eal/include/rte_uuid.h
@@ -15,6 +15,8 @@  extern "C" {
 #endif
 
 #include <stdbool.h>
+#include <stddef.h>
+#include <string.h>
 
 /**
  * Struct describing a Universal Unique Identifier