Commit 9485cce6 authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Martin Storsjö

time_internal: Do not attempt to override *time_r() macros

In case these already are defined as macros, we shouldn't try to
redefine them.
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent c93e92f2
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <time.h> #include <time.h>
#include "config.h" #include "config.h"
#if !HAVE_GMTIME_R #if !HAVE_GMTIME_R && !defined(gmtime_r)
static inline struct tm *gmtime_r(const time_t* clock, struct tm *result) static inline struct tm *gmtime_r(const time_t* clock, struct tm *result)
{ {
struct tm *ptr = gmtime(clock); struct tm *ptr = gmtime(clock);
...@@ -33,7 +33,7 @@ static inline struct tm *gmtime_r(const time_t* clock, struct tm *result) ...@@ -33,7 +33,7 @@ static inline struct tm *gmtime_r(const time_t* clock, struct tm *result)
} }
#endif #endif
#if !HAVE_LOCALTIME_R #if !HAVE_LOCALTIME_R && !defined(localtime_r)
static inline struct tm *localtime_r(const time_t* clock, struct tm *result) static inline struct tm *localtime_r(const time_t* clock, struct tm *result)
{ {
struct tm *ptr = localtime(clock); struct tm *ptr = localtime(clock);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment