X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Flibmemcached%2Fpoll.cc;h=5914aa47655236070f2e741b94d7da98e7e2121d;hb=4b584c02c679edd005cd2e542d2ff1d9dcb312b9;hp=b8324caa98876c93a8e1e38119913a301b501a36;hpb=c8a5aecba8e189092266f304ca81ab42625edf60;p=awesomized%2Flibmemcached diff --git a/src/libmemcached/poll.cc b/src/libmemcached/poll.cc index b8324caa..5914aa47 100644 --- a/src/libmemcached/poll.cc +++ b/src/libmemcached/poll.cc @@ -17,9 +17,13 @@ #if defined(_WIN32) # include "libmemcached/poll.h" - -# include -# include +# if HAVE_SYS_TIME_H +# include +# endif +# include +# if HAVE_STRINGS_H +# include +# endif int poll(struct pollfd fds[], nfds_t nfds, int tmo) { fd_set readfds, writefds, errorfds; @@ -45,7 +49,7 @@ int poll(struct pollfd fds[], nfds_t nfds, int tmo) { } } - struct timeval timeout = {.tv_sec = tmo / 1000, .tv_usec = (tmo % 1000) * 1000}; + struct timeval timeout = {tmo / 1000, (tmo % 1000) * 1000}; struct timeval *tp = &timeout; if (tmo == -1) { tp = NULL;