Skip to content

Commit 6d171bf

Browse files
committed
add extern inlines and add localtime_r to localtime overlay
1 parent d4b396b commit 6d171bf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

libc/hdr/localtime_overlay.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,22 @@
1515

1616
// Overlay mode
1717

18+
// glibc <unistd.h> header might provide extern inline definitions for few
19+
// functions, causing external alias errors. They are guarded by
20+
// `__USE_EXTERN_INLINES` macro.
21+
22+
#ifdef __USE_EXTERN_INLINES
23+
#define LIBC_OLD_USE_EXTERN_INLINES
24+
#undef __USE_EXTERN_INLINES
25+
#endif
26+
1827
#ifndef __NO_INLINE__
1928
#define __NO_INLINE__ 1
2029
#define LIBC_SET_NO_INLINE
2130
#endif
2231

2332
#include <localtime.h>
33+
#include <localtime_r.h>
2434

2535
#ifdef LIBC_SET_NO_INLINE
2636
#undef __NO_INLINE__

0 commit comments

Comments
 (0)