X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/agedu/blobdiff_plain/5a830bf80878bd1521a71017ce19882caa755d80..50e82fdc62d1e7c0747bdc8c17d7ef7b863e1460:/httpd.c diff --git a/httpd.c b/httpd.c index dfb17b7..7c3f0f8 100644 --- a/httpd.c +++ b/httpd.c @@ -2,24 +2,6 @@ * httpd.c: implementation of httpd.h. */ -#define _GNU_SOURCE - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "agedu.h" #include "alloc.h" #include "html.h" @@ -581,7 +563,9 @@ void run_httpd(const void *t, int authmask, const struct httpd_config *dcfg, */ while (1) { fd_set rfds, wfds; - int i, j, maxfd, ret; + int i, j; + SELECT_TYPE_ARG1 maxfd; + int ret; #define FD_SET_MAX(fd, set, max) \ do { FD_SET((fd),(set)); (max) = ((max)<=(fd)?(fd)+1:(max)); } while(0) @@ -630,7 +614,9 @@ void run_httpd(const void *t, int authmask, const struct httpd_config *dcfg, } nfds = i; - ret = select(maxfd, &rfds, &wfds, NULL, NULL); + ret = select(maxfd, SELECT_TYPE_ARG234 &rfds, + SELECT_TYPE_ARG234 &wfds, SELECT_TYPE_ARG234 NULL, + SELECT_TYPE_ARG5 NULL); if (ret <= 0) { if (ret < 0 && (errno != EINTR)) { fprintf(stderr, "select: %s", strerror(errno));