From: Jean-Philippe Orsini Date: Mon, 7 Nov 2011 01:03:56 +0000 (+0000) Subject: Fixed compilation with microhttpd >= 0.9.2 X-Git-Tag: v0.8.0.5~612 X-Git-Url: http://git.wpitchoune.net/gitweb/?p=psensor.git;a=commitdiff_plain;h=437ebbfba3a765c9a6cf25c07eedc39ebb678692 Fixed compilation with microhttpd >= 0.9.2 --- diff --git a/NEWS b/NEWS index ef2264c..c6af5dc 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ ** psensor: fixed error about 'expose-event' (signal replaced by 'draw') when compiled with gtk3. ** psensor: fixed typo in french translation file. +** psensor-server: fixed compilation with microhttpd >= 0.9.2. * v0.6.2.12 ** psensor: added -d option to enable debug log (written to $HOME/.psensor/log). diff --git a/src/server/server.c b/src/server/server.c index a87ec64..b00f8ae 100644 --- a/src/server/server.c +++ b/src/server/server.c @@ -130,8 +130,13 @@ char *get_path(const char *url, const char *www_dir) return res; } +#if MHD_VERSION >= 0x00090200 +static int +file_reader(void *cls, uint64_t pos, char *buf, size_t max) +#else static int file_reader(void *cls, uint64_t pos, char *buf, int max) +#endif { FILE *file = cls;