X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fsrc%2Fbuildconfig.c;fp=src%2Fsrc%2Fbuildconfig.c;h=3d404f100865e59e6519a2ee3f7e25d248ad4fa0;hb=02c30a32c6d1aeab0d3bc5f747016041a687c9dd;hp=310798fdd30e897f055e596be02db7de44c66fd6;hpb=590faf89a2dd33a5f97f8e685efd019ac9c96e1e;p=exim.git 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");