X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/7cc29763f75a5bb61942db60bbea2429d09daf15..190404d75c168ce1e6dbf6ee08bdbbf62b365e4b:/src/src/buildconfig.c diff --git a/src/src/buildconfig.c b/src/src/buildconfig.c index 310798fdd..3d404f100 100644 --- a/src/src/buildconfig.c +++ b/src/src/buildconfig.c @@ -36,6 +36,8 @@ normally called independently. */ #include #include #include +#include +#include #include #include @@ -956,6 +958,25 @@ if (have_auth) "#define SUPPORT_CRYPTEQ\n"); } +/* Check poll() for timer functionality. +Some OS' have released with it broken. */ + + { + struct timeval before, after; + int rc; + size_t us; + + gettimeofday(&before, NULL); + rc = poll(NULL, 0, 500); + gettimeofday(&after, NULL); + + us = (after.tv_sec - before.tv_sec) * 1000000 + + (after.tv_usec - before.tv_usec); + + if (us < 400000) + fprintf(new, "#define NO_POLL_H\n"); + } + /* End off */ fprintf(new, "\n/* End of config.h */\n");