diff --git a/stasis/common.h b/stasis/common.h index f9ba7e3..ce6dd7d 100644 --- a/stasis/common.h +++ b/stasis/common.h @@ -71,6 +71,7 @@ terms specified in this license. #endif #include +#define __STDC_LIMIT_MACROS // to get stdint.h to define the *_MAX and *_MIN macros under C++. #include // uint32, et. al. (has to be before sys/types.h for mcpp atop some broken gcc headers) #include // for size_t #include diff --git a/stasis/util/histogram.h b/stasis/util/histogram.h index c34b3e1..3e6e247 100644 --- a/stasis/util/histogram.h +++ b/stasis/util/histogram.h @@ -65,12 +65,12 @@ static inline void stasis_histogram_insert_log_timeval(stasis_histogram_64_t* hi } static inline void stasis_histogram_tick(stasis_histogram_64_t* hist) { - struct timeval * val = pthread_getspecific(hist->tls); + struct timeval * val = (struct timeval *)pthread_getspecific(hist->tls); if(!val) { val = stasis_alloc(struct timeval); pthread_setspecific(hist->tls, val); } gettimeofday(val,0); } static inline void stasis_histogram_tock(stasis_histogram_64_t* hist) { - struct timeval * val = pthread_getspecific(hist->tls); + struct timeval * val = (struct timeval *)pthread_getspecific(hist->tls); assert(val); struct timeval now; gettimeofday(&now,0);