Follow-up for
3ac4d68498dd378e2b3acd2bb86f4700263532d0
We have no sensible way to detect why strptime() fails, hence
the fallback path as it is now would fire on glibc systems too,
pointlessly. Let's guard it behind ifdeffery.
}
int parse_gmtoff(const char *t, long *ret) {
- int r;
-
assert(t);
struct tm tm;
return 0;
}
+#ifdef __GLIBC__
+ return -EINVAL;
+#else
+ int r;
+
/* musl v1.2.5 does not support %z specifier in strptime(). Since
* https://github.com/kraj/musl/commit/fced99e93daeefb0192fd16304f978d4401d1d77
* %z is supported, but it only supports strict RFC-822/ISO 8601 format, that is, 4 digits with sign
}
return 0;
+#endif
}
static int parse_timestamp_impl(