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

Re: [Minios-devel] [UNIKRAFT PATCH] lib/nolibc: Add offsetof macro to stddef.h



Reviewed-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx>

Razvan Cojocaru <razvan.cojocaru93@xxxxxxxxx> writes:

> Simple offsetof macro wrapper needed by Xen network netfront
> driver.
>
> Signed-off-by: Razvan Cojocaru <razvan.cojocaru93@xxxxxxxxx>
> ---
>  lib/nolibc/include/stddef.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/lib/nolibc/include/stddef.h b/lib/nolibc/include/stddef.h
> index 1e66615..a8ed523 100644
> --- a/lib/nolibc/include/stddef.h
> +++ b/lib/nolibc/include/stddef.h
> @@ -49,6 +49,10 @@ typedef __sptr ptrdiff_t;
>  #define NULL ((void *) 0)
>  #endif
>  
> +#ifndef offsetof
> +#define offsetof(t, d) __offsetof(t, d)
> +#endif
> +
>  #ifdef __cplusplus
>  }
>  #endif
> -- 
> 2.7.4
>

-- 
Yuri Volchkov
Software Specialist

NEC Europe Ltd
Kurfürsten-Anlage 36
D-69115 Heidelberg

_______________________________________________
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®.