summaryrefslogtreecommitdiff
path: root/timespec.h
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2015-06-04 17:01:19 -0700
committerGary E. Miller <gem@rellim.com>2015-06-04 17:01:19 -0700
commitb7ada8e1c8dc52589bdaecb4c1648d4eb6cf6641 (patch)
tree95216d563c75cd100f22ed99c0773be8e9b35df4 /timespec.h
parent271801553f4cd8da3b12c43a73f5a965cb1153f6 (diff)
downloadgpsd-b7ada8e1c8dc52589bdaecb4c1648d4eb6cf6641.tar.gz
NS_TO_SEC must be LL to prevent overflow on 32 bit binaries.
Diffstat (limited to 'timespec.h')
-rw-r--r--timespec.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/timespec.h b/timespec.h
index 3d5f4cef..d45856ee 100644
--- a/timespec.h
+++ b/timespec.h
@@ -18,8 +18,8 @@
*
* NOTE: this normalization is not the same as ntpd uses
*/
-#define NS_IN_SEC 1000000000
-#define MS_IN_SEC 1000000
+#define NS_IN_SEC 1000000000LL
+#define MS_IN_SEC 1000000LL
/* return the difference between timespecs in nanoseconds
* int may be too small, 32 bit long is too small, floats are too imprecise,