summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-04-17 21:03:15 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-04-17 22:19:24 -0500
commit0979c50b831c67e0b4f4a560435b867b35cdac67 (patch)
treed8afcae43c137abc797cb936a3aff0957add6c91 /src
parent36e0a4286937ccb25bc78392a679f496029765b0 (diff)
downloadmusl-0979c50b831c67e0b4f4a560435b867b35cdac67.tar.gz
musl-0979c50b831c67e0b4f4a560435b867b35cdac67.tar.bz2
musl-0979c50b831c67e0b4f4a560435b867b35cdac67.tar.xz
musl-0979c50b831c67e0b4f4a560435b867b35cdac67.zip
time: C11 visibility fixes
The timespec_get function, and TIME_* macros, are only in C11. Since musl is compiled with -std=c99, TIME_UTC is unavailable in the timespec_get implementation, so we use the raw value 1.
Diffstat (limited to 'src')
-rw-r--r--src/time/timespec_get.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/time/timespec_get.c b/src/time/timespec_get.c
index 03c5a77b..c423b825 100644
--- a/src/time/timespec_get.c
+++ b/src/time/timespec_get.c
@@ -6,7 +6,7 @@ int __clock_gettime(clockid_t, struct timespec *);
* are considered erroneous. */
int timespec_get(struct timespec * ts, int base)
{
- if (base != TIME_UTC) return 0;
+ if (base != 1) return 0;
int ret = __clock_gettime(CLOCK_REALTIME, ts);
return ret < 0 ? 0 : base;
}