From a097bb71fe67accdcf7cc23818006c8eedbfebfc Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Thu, 3 Sep 2020 03:29:55 +0000 Subject: [PATCH] redefined hawk_ntime_sec_t with a data size guard --- hawk/lib/hawk-cmn.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hawk/lib/hawk-cmn.h b/hawk/lib/hawk-cmn.h index 3c50d05a..9a3474c5 100644 --- a/hawk/lib/hawk-cmn.h +++ b/hawk/lib/hawk-cmn.h @@ -647,7 +647,11 @@ struct hawk_link_t #define HAWK_SEC_TO_USEC(sec) ((sec) * HAWK_USECS_PER_SEC) #define HAWK_USEC_TO_SEC(usec) ((usec) / HAWK_USECS_PER_SEC) +#if defined(HAWK_SIZEOF_INT64_T) && (HAWK_SIZEOF_INT64_T > 0) typedef hawk_int64_t hawk_ntime_sec_t; +#else +typedef hawk_int32_t hawk_ntime_sec_t; +#endif typedef hawk_int32_t hawk_ntime_nsec_t; typedef struct hawk_ntime_t hawk_ntime_t;