diff --git a/src/ndhc.h b/src/ndhc.h index 467a102..76a4e6c 100644 --- a/src/ndhc.h +++ b/src/ndhc.h @@ -36,7 +36,7 @@ struct client_state_t { struct nk_random_state_u32 rnd32_state; - unsigned long long leaseStartTime, renewTime, rebindTime; + long long leaseStartTime, renewTime, rebindTime; long long dhcp_wake_ts; int ifsPrevState; int ifDeconfig; // Set if the interface has already been deconfigured. diff --git a/src/sys.h b/src/sys.h index 598bc8a..b3bc685 100644 --- a/src/sys.h +++ b/src/sys.h @@ -31,11 +31,11 @@ #include #include "ndhc-defines.h" -static inline unsigned long long curms() +static inline long long curms() { struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); - return ts.tv_sec * 1000ULL + ts.tv_nsec / 1000000ULL; + return ts.tv_sec * 1000LL + ts.tv_nsec / 1000000LL; } static inline size_t min_size_t(size_t a, size_t b)