From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heinrich Schuchardt Date: Tue, 26 Nov 2019 08:31:18 +0100 Subject: [U-Boot] [PATCH v3 06/16] linux/time.h: include vsprintf.h In-Reply-To: <6cce30a5-7e79-9c49-2d78-a3a38da7e143@gmx.de> References: <20191113004502.29986-1-takahiro.akashi@linaro.org> <20191113004502.29986-7-takahiro.akashi@linaro.org> <6cce30a5-7e79-9c49-2d78-a3a38da7e143@gmx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 11/26/19 4:56 AM, Heinrich Schuchardt wrote: > 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 Could it be that in one of your C files you simply didn't follow the U-Boot coding style convention to include common.h first and we don't need this patch at all? https://www.denx.de/wiki/U-Boot/CodingStyle#Include_files Best regards Heinrich