Fixed compilation with microhttpd >= 0.9.2
authorJean-Philippe Orsini <jeanfi@gmail.com>
Mon, 7 Nov 2011 01:03:56 +0000 (01:03 +0000)
committerJean-Philippe Orsini <jeanfi@gmail.com>
Mon, 7 Nov 2011 01:03:56 +0000 (01:03 +0000)
NEWS
src/server/server.c

diff --git a/NEWS b/NEWS
index ef2264c..c6af5dc 100644 (file)
--- 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).
index a87ec64..b00f8ae 100644 (file)
@@ -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;