From 2abfb2ccca43a2db29de5c76b4338eb929bd284b Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Wed, 12 Jun 2019 17:37:14 +0300 Subject: [PATCH] memorypool: refactored includes, moved out unrelated function --- src/microhttpd/daemon.c | 15 +++++++++++++++ src/microhttpd/memorypool.c | 16 +--------------- src/microhttpd/memorypool.h | 3 ++- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 8ec310cc..2729bb21 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c @@ -234,6 +234,21 @@ MHD_default_logger_ (void *cls, } +/** + * Free the memory given by @a ptr. Calls "free(ptr)". This function + * should be used to free the username returned by + * #MHD_digest_auth_get_username(). + * @note Since v0.9.56 + * + * @param ptr pointer to free. + */ +_MHD_EXTERN void +MHD_free (void *ptr) +{ + free (ptr); +} + + /** * Trace up to and return master daemon. If the supplied daemon * is a master, then return the daemon itself. diff --git a/src/microhttpd/memorypool.c b/src/microhttpd/memorypool.c index 9639d552..415b8aa5 100644 --- a/src/microhttpd/memorypool.c +++ b/src/microhttpd/memorypool.c @@ -25,6 +25,7 @@ * @author Karlson2k (Evgeny Grin) */ #include "memorypool.h" +#include "internal.h" #include "mhd_assert.h" /* define MAP_ANONYMOUS for Mac OS X */ @@ -80,21 +81,6 @@ struct MemoryPool }; -/** - * Free the memory given by @a ptr. Calls "free(ptr)". This function - * should be used to free the username returned by - * #MHD_digest_auth_get_username(). - * @note Since v0.9.56 - * - * @param ptr pointer to free. - */ -_MHD_EXTERN void -MHD_free (void *ptr) -{ - free (ptr); -} - - /** * Create a memory pool. * diff --git a/src/microhttpd/memorypool.h b/src/microhttpd/memorypool.h index 69b7e851..2863b2f3 100644 --- a/src/microhttpd/memorypool.h +++ b/src/microhttpd/memorypool.h @@ -30,7 +30,8 @@ #ifndef MEMORYPOOL_H #define MEMORYPOOL_H -#include "internal.h" +#include "mhd_options.h" +#include /** * Opaque handle for a memory pool.