From 7ddf88245906bc8f08a48ebe992ace63922bf439 Mon Sep 17 00:00:00 2001 From: Vikram Rajkumar Date: Fri, 17 Oct 2014 13:23:51 -0400 Subject: [PATCH] Fix linux build --- src/network/ntp.cpp | 4 ++-- src/real128.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/network/ntp.cpp b/src/network/ntp.cpp index 7a08d3a..bd7d43a 100644 --- a/src/network/ntp.cpp +++ b/src/network/ntp.cpp @@ -51,7 +51,7 @@ namespace fc { uint64_t ntp_timestamp_host = bswap_64(ntp_timestamp_net_order); uint32_t fractional_seconds = ntp_timestamp_host & 0xffffffff; - uint32_t microseconds = (uint32_t)((((uint64_t)fractional_seconds * 1000000) + (UINT64_C(1) << 31)) >> 32); + uint32_t microseconds = (uint32_t)((((uint64_t)fractional_seconds * 1000000) + (uint64_t(1) << 31)) >> 32); uint32_t seconds_since_1900 = ntp_timestamp_host >> 32; uint32_t seconds_since_epoch = seconds_since_1900 - 2208988800; return fc::time_point() + fc::seconds(seconds_since_epoch) + fc::microseconds(microseconds); @@ -63,7 +63,7 @@ namespace fc uint32_t seconds_since_epoch = (uint32_t)(microseconds_since_epoch / 1000000); uint32_t seconds_since_1900 = seconds_since_epoch + 2208988800; uint32_t microseconds = microseconds_since_epoch % 1000000; - uint32_t fractional_seconds = (uint32_t)((((uint64_t)microseconds << 32) + (UINT64_C(1) << 31)) / 1000000); + uint32_t fractional_seconds = (uint32_t)((((uint64_t)microseconds << 32) + (uint64_t(1) << 31)) / 1000000); uint64_t ntp_timestamp_net_order = ((uint64_t)seconds_since_1900 << 32) + fractional_seconds; return bswap_64(ntp_timestamp_net_order); } diff --git a/src/real128.cpp b/src/real128.cpp index 4d1e44a..3f5b431 100644 --- a/src/real128.cpp +++ b/src/real128.cpp @@ -4,7 +4,7 @@ #include #include -#define PRECISION (UINT64_C(1000000) * UINT64_C(1000000) * UINT64_C(1000000)) +#define PRECISION (uint64_t(1000000) * uint64_t(1000000) * uint64_t(1000000)) namespace fc {