aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2022-12-29 01:55:19 +0800
committerJia Tan <jiat0218@gmail.com>2022-12-30 23:34:31 +0800
commit2fcba17fc4d7eda8fc60567169cf2a0e6fcfb2f8 (patch)
tree37c059c38465c5970a3dbc0aad1fca5da983353d /src
parentliblzma: Includes sys/time.h conditionally in mythread (diff)
downloadxz-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.c4
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