[systemd-devel] [PATCH] timesync: Use UINT64_C for OFFSET_1900_1970

Cristian Rodríguez crrodriguez at opensuse.org
Mon Feb 16 08:24:29 PST 2015


So it matches what the comment says in both 32 and 64 bit systems.
---
 src/timesync/timesyncd-manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c
index 223671c..73ac7ee 100644
--- a/src/timesync/timesyncd-manager.c
+++ b/src/timesync/timesyncd-manager.c
@@ -98,7 +98,7 @@
  * "NTP timestamps are represented as a 64-bit unsigned fixed-point number,
  * in seconds relative to 0h on 1 January 1900."
  */
-#define OFFSET_1900_1970        2208988800UL
+#define OFFSET_1900_1970        UINT64_C(2208988800)
 
 #define RETRY_USEC (30*USEC_PER_SEC)
 #define RATELIMIT_INTERVAL_USEC (10*USEC_PER_SEC)
-- 
2.2.2



More information about the systemd-devel mailing list