[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH] lib/uknetdev: Fix compiler warning



Thanks, Florian!

Reviewed-by: Costin Lupu <costin.lupu@xxxxxxxxx>

On 5/10/19 3:26 PM, Florian Schmidt wrote:
> For stdio.h to provide the declaration of asprintf(), _GNU_SOURCE needs
> to be defined. This needs to be done before the first libc header
> include, or it may not have an effect any more.
> 
> Signed-off-by: Florian Schmidt <florian.schmidt@xxxxxxxxx>
> ---
>  lib/uknetdev/netdev.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/uknetdev/netdev.c b/lib/uknetdev/netdev.c
> index cda8a82..57133b3 100644
> --- a/lib/uknetdev/netdev.c
> +++ b/lib/uknetdev/netdev.c
> @@ -33,8 +33,9 @@
>   *
>   * THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY.
>   */
> -#include <string.h>
> +#define _GNU_SOURCE /* for asprintf() */
>  #include <stdio.h>
> +#include <string.h>
>  #include <uk/netdev.h>
>  #include <uk/print.h>
>  
> 

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.