X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Ftimeval.h;h=0bd74ccdeec7f75173199744c84f8fd05302d058;hb=c5cf10598f8c9f4428291e9df3ecd72a05fb1ccf;hp=1bbfd5cd1c92ccc7d6b2eafff88f3b0da78abc7a;hpb=53d98a1e9c8c2e5ea2bde30d3461c1d5bfbbfa97;p=sliver-openvswitch.git diff --git a/lib/timeval.h b/lib/timeval.h index 1bbfd5cd1..0bd74ccde 100644 --- a/lib/timeval.h +++ b/lib/timeval.h @@ -40,6 +40,11 @@ BUILD_ASSERT_DECL(TYPE_IS_SIGNED(time_t)); #define TIME_MAX TYPE_MAXIMUM(time_t) #define TIME_MIN TYPE_MINIMUM(time_t) +#ifdef _WIN32 +#define localtime_r(timep, result) localtime_s(result, timep) +#define gmtime_r(timep, result) gmtime_s(result, timep) +#endif /* _WIN32 */ + struct tm_msec { struct tm tm; int msec; @@ -52,8 +57,8 @@ long long int time_wall_msec(void); void time_timespec(struct timespec *); void time_wall_timespec(struct timespec *); void time_alarm(unsigned int secs); -int time_poll(struct pollfd *, int n_pollfds, long long int timeout_when, - int *elapsed); +int time_poll(struct pollfd *, int n_pollfds, HANDLE *handles, + long long int timeout_when, int *elapsed); long long int timespec_to_msec(const struct timespec *); long long int timeval_to_msec(const struct timeval *);