diff options
author | Jia Tan <jiat0218@gmail.com> | 2022-12-29 01:55:19 +0800 |
---|---|---|
committer | Jia Tan <jiat0218@gmail.com> | 2023-01-05 00:27:51 +0800 |
commit | c410d812ea12bfc74f6b727c1a799478c79f19ca (patch) | |
tree | 000e60906f3b07fac46212e6c68680e0081b3d61 /src | |
parent | liblzma: Includes sys/time.h conditionally in mythread (diff) | |
download | xz-c410d812ea12bfc74f6b727c1a799478c79f19ca.tar.xz |
xz: Includes <time.h> and <sys/time.h> conditionally in mytime.c.
Previously, mytime.c depended on mythread.h for <time.h> to be included.
Diffstat (limited to 'src')
-rw-r--r-- | src/xz/mytime.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xz/mytime.c b/src/xz/mytime.c index a81c88af..7e8a0749 100644 --- a/src/xz/mytime.c +++ b/src/xz/mytime.c @@ -12,7 +12,9 @@ #include "private.h" -#if !(defined(HAVE_CLOCK_GETTIME) && defined(HAVE_CLOCK_MONOTONIC)) +#if defined(HAVE_CLOCK_GETTIME) && defined(HAVE_CLOCK_MONOTONIC) +# include <time.h> +#else # include <sys/time.h> #endif |