[U-Boot] [PATCH v3 06/16] linux/time.h: include vsprintf.h

Heinrich Schuchardt xypron.glpk at gmx.de
Tue Nov 26 03:56:32 UTC 2019


On 11/13/19 1:44 AM, AKASHI Takahiro wrote:
> Without this commit, time.h possibly causes a build error as
> asctime_r() uses sprintf().

asctime_r() is not a Linux symbol (as of next-20191119)

ctime_r() and asctime_r() are defined as inline functions. ctime_r() is
used in multiple places and so we may end up duplicating code. So I
would prefer the inline functions in time.h to be moved to a separate C
file in lib/.

Best regards

Heinrich

>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
> ---
>   include/linux/time.h | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/include/linux/time.h b/include/linux/time.h
> index dc9344a6d97b..702dd276aea5 100644
> --- a/include/linux/time.h
> +++ b/include/linux/time.h
> @@ -2,6 +2,7 @@
>   #define _LINUX_TIME_H
>
>   #include <rtc.h>
> +#include <vsprintf.h>
>   #include <linux/types.h>
>
>   #define _DEFUN(a,b,c) a(c)
>



More information about the U-Boot mailing list