diff options
author | Gary E. Miller <gem@rellim.com> | 2015-06-04 17:01:19 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2015-06-04 17:01:19 -0700 |
commit | b7ada8e1c8dc52589bdaecb4c1648d4eb6cf6641 (patch) | |
tree | 95216d563c75cd100f22ed99c0773be8e9b35df4 /timespec.h | |
parent | 271801553f4cd8da3b12c43a73f5a965cb1153f6 (diff) | |
download | gpsd-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.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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, |