summaryrefslogtreecommitdiff
path: root/programs/timefn.h
diff options
context:
space:
mode:
Diffstat (limited to 'programs/timefn.h')
-rw-r--r--programs/timefn.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/programs/timefn.h b/programs/timefn.h
index 2db3765b93088..eb3c130934ebb 100644
--- a/programs/timefn.h
+++ b/programs/timefn.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
+ * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under both the BSD-style license (found in the
@@ -41,7 +41,7 @@ extern "C" {
******************************************/
#if defined(_WIN32) /* Windows */
- #include <Windows.h> /* LARGE_INTEGER */
+ #include <windows.h> /* LARGE_INTEGER */
typedef LARGE_INTEGER UTIL_time_t;
#define UTIL_TIME_INITIALIZER { { 0, 0 } }
@@ -51,8 +51,10 @@ extern "C" {
typedef PTime UTIL_time_t;
#define UTIL_TIME_INITIALIZER 0
+/* C11 requires timespec_get, but FreeBSD 11 lacks it, while still claiming C11 compliance.
+ Android also lacks it but does define TIME_UTC. */
#elif (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */) \
- && defined(TIME_UTC) /* C11 requires timespec_get, but FreeBSD 11 lacks it, while still claiming C11 compliance */
+ && defined(TIME_UTC) && !defined(__ANDROID__)
typedef struct timespec UTIL_time_t;
#define UTIL_TIME_INITIALIZER { 0, 0 }