We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 924652d + f1d8378 commit a32a45cCopy full SHA for a32a45c
platform/include/platform/mbed_rtc_time.h
@@ -32,8 +32,13 @@ extern "C" {
32
* @{
33
*/
34
35
-/* Timeval definition for non GCC_ARM toolchains */
36
-#if !defined(__GNUC__) || defined(__clang__)
+/* Timeval definition for non GCC_ARM toolchains,
+ * Note: The GNU libc defines _TIMEVAL_DEFINED and the newlib defines __timeval_defined,
37
+ * thus the double-check and double-define
38
+ */
39
+#if !defined(__timeval_defined) && !defined(_TIMEVAL_DEFINED)
40
+#define __timeval_defined 1
41
+#define _TIMEVAL_DEFINED
42
struct timeval {
43
time_t tv_sec;
44
int32_t tv_usec;
0 commit comments