ctime.c and localtime_r_utc.c may use POSIX-only functions; to ensure those are visible from a POSIX-conforming C library, define _POSIX_C_SOURCE in these source files. Signed-off-by: Keith Packard <keithp@keithp.com>
20 lines
331 B
C
20 lines
331 B
C
/*
|
|
* Copyright (c) 2024 Meta Platforms
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#undef _POSIX_C_SOURCE
|
|
#define _POSIX_C_SOURCE 200809L
|
|
#include <time.h>
|
|
|
|
struct tm *localtime_r(const time_t *timer, struct tm *result)
|
|
{
|
|
return gmtime_r(timer, result);
|
|
}
|
|
|
|
struct tm *localtime(const time_t *timer)
|
|
{
|
|
return gmtime(timer);
|
|
}
|