eal/windows: fix missing header inclusion

Message ID 20201020084815.13796-1-talshn@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series eal/windows: fix missing header inclusion |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-testing fail Testing issues
ci/Intel-compilation success Compilation OK

Commit Message

Tal Shnaiderman Oct. 20, 2020, 8:48 a.m. UTC
  Following the addition of the in_addr/in6_addr structs
to in.h the header file must have stdint.h included
for the definitions of the uint8_t/uint32_t types used
within the new structs.

Not having it could results in the following errors
in places where in.h is included:

in.h:30:2: error: unknown type name 'uint32_t'
        uint32_t s_addr;

in.h:34:2: error: unknown type name 'uint8_t'
        uint8_t s6_addr[16];

Fixes: f40a74cfcf0 ("eal/windows: improve compatibility networking headers")
Cc: stable@dpdk.org

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
---
 lib/librte_eal/windows/include/netinet/in.h | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Dmitry Kozlyuk Oct. 20, 2020, 9:37 a.m. UTC | #1
On Tue, 20 Oct 2020 11:48:15 +0300, Tal Shnaiderman wrote:
> Following the addition of the in_addr/in6_addr structs
> to in.h the header file must have stdint.h included
> for the definitions of the uint8_t/uint32_t types used
> within the new structs.
> 
> Not having it could results in the following errors
> in places where in.h is included:
> 
> in.h:30:2: error: unknown type name 'uint32_t'
>         uint32_t s_addr;
> 
> in.h:34:2: error: unknown type name 'uint8_t'
>         uint8_t s6_addr[16];
> 
> Fixes: f40a74cfcf0 ("eal/windows: improve compatibility networking headers")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> ---
>  lib/librte_eal/windows/include/netinet/in.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/librte_eal/windows/include/netinet/in.h b/lib/librte_eal/windows/include/netinet/in.h
> index be1469ec11..6455b9ba51 100644
> --- a/lib/librte_eal/windows/include/netinet/in.h
> +++ b/lib/librte_eal/windows/include/netinet/in.h
> @@ -5,6 +5,7 @@
>  #ifndef _IN_H_
>  #define _IN_H_
>  
> +#include <stdint.h>
>  #include <sys/socket.h>
>  
>  #define IPPROTO_IP         0

Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
  
Thomas Monjalon Oct. 20, 2020, 11:47 a.m. UTC | #2
20/10/2020 11:37, Dmitry Kozlyuk:
> On Tue, 20 Oct 2020 11:48:15 +0300, Tal Shnaiderman wrote:
> > Following the addition of the in_addr/in6_addr structs
> > to in.h the header file must have stdint.h included
> > for the definitions of the uint8_t/uint32_t types used
> > within the new structs.
> > 
> > Not having it could results in the following errors
> > in places where in.h is included:
> > 
> > in.h:30:2: error: unknown type name 'uint32_t'
> >         uint32_t s_addr;
> > 
> > in.h:34:2: error: unknown type name 'uint8_t'
> >         uint8_t s6_addr[16];
> > 
> > Fixes: f40a74cfcf0 ("eal/windows: improve compatibility networking headers")
> > Cc: stable@dpdk.org

Removing stable@dpdk.org as the bug is only in current release.

> > 
> > Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
> 
> Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

Applied, thanks
  

Patch

diff --git a/lib/librte_eal/windows/include/netinet/in.h b/lib/librte_eal/windows/include/netinet/in.h
index be1469ec11..6455b9ba51 100644
--- a/lib/librte_eal/windows/include/netinet/in.h
+++ b/lib/librte_eal/windows/include/netinet/in.h
@@ -5,6 +5,7 @@ 
 #ifndef _IN_H_
 #define _IN_H_
 
+#include <stdint.h>
 #include <sys/socket.h>
 
 #define IPPROTO_IP         0