From 437ebbfba3a765c9a6cf25c07eedc39ebb678692 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Orsini Date: Mon, 7 Nov 2011 01:03:56 +0000 Subject: [PATCH] Fixed compilation with microhttpd >= 0.9.2 --- NEWS | 1 + src/server/server.c | 5 +++++ 2 files changed, 6 insertions(+) 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; -- 2.7.4