Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/majn/tgl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2021-04-04 18:44:06 +0300
committerBen Wiederhake <BenWiederhake.GitHub@gmx.de>2021-04-04 18:44:06 +0300
commit0d07cea7e6f17f0a9ef279a880e13ed6346c2b3f (patch)
treeedc73b77093786a1c6e121ff729fe1c7286dac00
parent7141a27d45df9c9e202f37f5fe1df7137453003c (diff)
Fix tools.c for newer MinGW versionsHEADmaster
-rw-r--r--tools.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools.c b/tools.c
index 75eb726..017059f 100644
--- a/tools.c
+++ b/tools.c
@@ -49,6 +49,8 @@
#ifdef WIN32
#include <winsock2.h>
#include <windows.h>
+#if __MINGW64_VERSION_MAJOR < 8
+/* Starting with MinGW 8.0.0, it already defines this function. */
int vasprintf(char ** __restrict__ ret,
const char * __restrict__ format,
va_list ap) {
@@ -66,6 +68,7 @@ int vasprintf(char ** __restrict__ ret,
(*ret)[len] = '\0';
return len;
}
+#endif
int clock_gettime(int ignored, struct timespec *spec)
{