[dpdk-dev] librte_hash: Fix compile errors on IBM POWER

Message ID 1449563332-1536-1-git-send-email-chaozhu@linux.vnet.ibm.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Chao Zhu Dec. 8, 2015, 8:28 a.m. UTC
  This patch fixes the compile errors caused by lacking of "size_t" definition in rte_hash.h.

Signed-off-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
---
 lib/librte_hash/rte_hash.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
  

Comments

Jerin Jacob Dec. 8, 2015, 9:10 a.m. UTC | #1
On Tue, Dec 08, 2015 at 04:28:52PM +0800, Chao Zhu wrote:
> This patch fixes the compile errors caused by lacking of "size_t" definition in rte_hash.h.
> 
> Signed-off-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
> ---
>  lib/librte_hash/rte_hash.h |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/lib/librte_hash/rte_hash.h b/lib/librte_hash/rte_hash.h
> index 6494ade..5046e9b 100644
> --- a/lib/librte_hash/rte_hash.h
> +++ b/lib/librte_hash/rte_hash.h
> @@ -41,6 +41,7 @@
>   */
>  
>  #include <stdint.h>
> +#include <stdio.h>

Thanks for the patch.
The Same issue comes with arm64 GCC 5.2 compiler too.
Shouldn't be stddef.h instead of stdio.h?

>  
>  #ifdef __cplusplus
>  extern "C" {
> -- 
> 1.7.1
>
  
Thomas Monjalon Dec. 8, 2015, 10:05 a.m. UTC | #2
2015-12-08 16:28, Chao Zhu:
> This patch fixes the compile errors caused by lacking of "size_t" definition in rte_hash.h.
> 
> Signed-off-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>

Please Chao, could you provide the exact error and a Fixes: line in the
commit message?
Thanks
  
Chao Zhu Dec. 9, 2015, 3:54 a.m. UTC | #3
Jerin,

Both stdio.h and stddef.h works on POWER.  To make it work on ARM, I'll 
use stddef.h and submit another patch.
Thanks!

On 2015/12/8 17:10, Jerin Jacob wrote:
> On Tue, Dec 08, 2015 at 04:28:52PM +0800, Chao Zhu wrote:
>> This patch fixes the compile errors caused by lacking of "size_t" definition in rte_hash.h.
>>
>> Signed-off-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
>> ---
>>   lib/librte_hash/rte_hash.h |    1 +
>>   1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/lib/librte_hash/rte_hash.h b/lib/librte_hash/rte_hash.h
>> index 6494ade..5046e9b 100644
>> --- a/lib/librte_hash/rte_hash.h
>> +++ b/lib/librte_hash/rte_hash.h
>> @@ -41,6 +41,7 @@
>>    */
>>   
>>   #include <stdint.h>
>> +#include <stdio.h>
> Thanks for the patch.
> The Same issue comes with arm64 GCC 5.2 compiler too.
> Shouldn't be stddef.h instead of stdio.h?
>
>>   
>>   #ifdef __cplusplus
>>   extern "C" {
>> -- 
>> 1.7.1
>>
  

Patch

diff --git a/lib/librte_hash/rte_hash.h b/lib/librte_hash/rte_hash.h
index 6494ade..5046e9b 100644
--- a/lib/librte_hash/rte_hash.h
+++ b/lib/librte_hash/rte_hash.h
@@ -41,6 +41,7 @@ 
  */
 
 #include <stdint.h>
+#include <stdio.h>
 
 #ifdef __cplusplus
 extern "C" {