X-Git-Url: http://git.indexdata.com/?p=pazpar2-moved-to-github.git;a=blobdiff_plain;f=src%2Fhttp_command.c;h=0de007bcecc708a4309cb2299d6747d4d5d1a4d2;hp=24928d95c1705ca4c0069592c4418a8ed867dcf6;hb=cc178327044177f177d0474b757f53bcd86b4d42;hpb=6649b4b82ef1242cb0c8d59ebc240e71080e0cfc diff --git a/src/http_command.c b/src/http_command.c index 24928d9..0de007b 100644 --- a/src/http_command.c +++ b/src/http_command.c @@ -23,12 +23,18 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include +#if HAVE_SYS_UIO_H #include +#endif +#if HAVE_UNISTD_H #include +#endif #include -#include +#include #include +#if HAVE_SYS_TIME_H #include +#endif #include #if HAVE_CONFIG_H #include @@ -166,6 +172,9 @@ unsigned int make_sessionid() res = seq; else { +#ifdef WIN32 + res = seq; +#else struct timeval t; if (gettimeofday(&t, 0) < 0) @@ -177,6 +186,7 @@ unsigned int make_sessionid() (long long would be more appropriate)*/ res = t.tv_sec; res = ((res << 8) | (seq & 0xff)) & ((1U << 31) - 1); +#endif } return res; }