libc: Unify the selection of inline or macro

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I44a26550ff856af07d2d96a6f0a6066f988d6da3
This commit is contained in:
Xiang Xiao
2020-06-02 21:41:13 +08:00
committed by patacongo
parent de509004fd
commit a7174cee30
4 changed files with 44 additions and 43 deletions
+2 -2
View File
@@ -201,8 +201,8 @@ int clock_settime(clockid_t clockid, FAR const struct timespec *tp);
int clock_gettime(clockid_t clockid, FAR struct timespec *tp);
int clock_getres(clockid_t clockid, FAR struct timespec *res);
#ifdef __cplusplus
inline int timespec_get(FAR struct timespec *t, int b)
#ifdef CONFIG_HAVE_INLINE
static inline int timespec_get(FAR struct timespec *t, int b)
{
return b == TIME_UTC ? (clock_gettime(CLOCK_REALTIME, t), b) : 0;
}