[dpdk-dev,1/2] eal: fix build with glibc < 2.16

Message ID 20180427024342.24054-2-thomas@monjalon.net (mailing list archive)
State Accepted, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply patch file failure

Commit Message

Thomas Monjalon April 27, 2018, 2:43 a.m. UTC
  The fake getauxval function does not use its parameter.
So the compiler raised this error:
	lib/librte_eal/common/eal_common_cpuflags.c:25:25: error:
	unused parameter 'type'

Fixes: 2ed9bf330709 ("eal: abstract away the auxiliary vector")
Cc: aconole@redhat.com
Cc: tredaelli@redhat.com

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_eal/common/eal_common_cpuflags.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Aaron Conole April 30, 2018, 1:13 p.m. UTC | #1
Thomas Monjalon <thomas@monjalon.net> writes:

> The fake getauxval function does not use its parameter.
> So the compiler raised this error:
> 	lib/librte_eal/common/eal_common_cpuflags.c:25:25: error:
> 	unused parameter 'type'
>
> Fixes: 2ed9bf330709 ("eal: abstract away the auxiliary vector")
> Cc: aconole@redhat.com
> Cc: tredaelli@redhat.com
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
Oops - sorry about that.

Acked-by: Aaron Conole <aconole@redhat.com>

>  lib/librte_eal/common/eal_common_cpuflags.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/librte_eal/common/eal_common_cpuflags.c b/lib/librte_eal/common/eal_common_cpuflags.c
> index a09667563..6a9dbaeb1 100644
> --- a/lib/librte_eal/common/eal_common_cpuflags.c
> +++ b/lib/librte_eal/common/eal_common_cpuflags.c
> @@ -22,7 +22,7 @@
>  
>  #ifndef HAS_AUXV
>  static unsigned long
> -getauxval(unsigned long type)
> +getauxval(unsigned long type __rte_unused)
>  {
>  	errno = ENOTSUP;
>  	return 0;
  

Patch

diff --git a/lib/librte_eal/common/eal_common_cpuflags.c b/lib/librte_eal/common/eal_common_cpuflags.c
index a09667563..6a9dbaeb1 100644
--- a/lib/librte_eal/common/eal_common_cpuflags.c
+++ b/lib/librte_eal/common/eal_common_cpuflags.c
@@ -22,7 +22,7 @@ 
 
 #ifndef HAS_AUXV
 static unsigned long
-getauxval(unsigned long type)
+getauxval(unsigned long type __rte_unused)
 {
 	errno = ENOTSUP;
 	return 0;