diff options
author | Jia Tan <jiat0218@gmail.com> | 2022-12-29 01:55:19 +0800 |
---|---|---|
committer | Jia Tan <jiat0218@gmail.com> | 2022-12-30 23:34:31 +0800 |
commit | 2fcba17fc4d7eda8fc60567169cf2a0e6fcfb2f8 (patch) | |
tree | 37c059c38465c5970a3dbc0aad1fca5da983353d /src | |
parent | liblzma: Includes sys/time.h conditionally in mythread (diff) | |
download | xz-2fcba17fc4d7eda8fc60567169cf2a0e6fcfb2f8.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 |