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:
authorEion Robb <eion@robbmob.com>2015-10-22 11:32:27 +0300
committerEion Robb <eion@robbmob.com>2015-10-22 11:32:27 +0300
commita8db9919da2f5a2fd88cf6d12a0d0ab4ad0ef526 (patch)
treed6931b899a265dc5a7595a16f6f2d109848266d0 /mtproto-common.h
parent5b725d288f59ada3f8905a73182fe57ae8c22986 (diff)
Allow compiling on Windows
Diffstat (limited to 'mtproto-common.h')
-rw-r--r--mtproto-common.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/mtproto-common.h b/mtproto-common.h
index d6783c6..9cecde7 100644
--- a/mtproto-common.h
+++ b/mtproto-common.h
@@ -27,6 +27,13 @@
#include <stdio.h>
#include <assert.h>
+
+#if defined(_MSC_VER) || defined(__MINGW32__)
+#define INT64_PRINTF_MODIFIER "I64"
+#else
+#define INT64_PRINTF_MODIFIER "ll"
+#endif
+
//#include "interface.h"
#include "tools.h"
#include "auto/constants.h"
@@ -377,7 +384,7 @@ static inline void hexdump_out (void) {
hexdump (packet_buffer, packet_ptr);
}*/
-#ifdef __MACH__
+#ifndef CLOCK_REALTIME
#define CLOCK_REALTIME 0
#define CLOCK_MONOTONIC 1
#endif