View Issue Details

IDProjectCategoryView StatusLast Update
0006135libmicrohttpdotherpublic2021-09-02 17:54
Reporterbkuhls Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.70 
Target Version0.9.71Fixed in Version0.9.71 
Summary0006135: Fix non-threaded build
Descriptionhttps://git.gnunet.org/libmicrohttpd.git/commit/src/microhttpd/daemon.c?id=185f740e0684a8758cbf381fe5c44b3ed72d4a40
added code outside "if defined(MHD_USE_POSIX_THREADS)" which uses insanity_level, which in turn is only available for threaded builds causing a build error:

daemon.c: In function 'parse_options_va':
daemon.c:5089:13: error: 'struct MHD_Daemon' has no member named 'insanity_level'
       daemon->insanity_level = (enum MHD_DisableSanityCheck)

Attached patch fixes the problem.
TagsNo tags attached.
Attached Files
0001-daemon.c-fix-non-threaded-build.patch (1,242 bytes)   
From 12e955560730b9caab0e73f693b6382413a8b48e Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd.kuhls@t-online.de>
Date: Tue, 24 Mar 2020 21:53:27 +0100
Subject: [PATCH] daemon.c: fix non-threaded build

insanity_level is available only for threaded builds.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 src/microhttpd/daemon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 4f7c2108..51e9fd5b 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -5086,12 +5086,12 @@ parse_options_va (struct MHD_Daemon *daemon,
       daemon->uri_log_callback_cls = va_arg (ap,
                                              void *);
       break;
+#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
     case MHD_OPTION_SERVER_INSANITY:
       daemon->insanity_level = (enum MHD_DisableSanityCheck)
                                va_arg (ap,
                                        unsigned int);
       break;
-#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
     case MHD_OPTION_THREAD_POOL_SIZE:
       daemon->worker_pool_size = va_arg (ap,
                                          unsigned int);
-- 
2.25.0

Activities

Christian Grothoff

2020-03-26 19:13

manager   ~0015465

Fixed in 2e8a4f8b..6702e620 (but differently: making insanity_level field not conditional on having threads).

Christian Grothoff

2021-09-02 17:54

manager   ~0018168

Fix committed to master branch.

Related Changesets

libmicrohttpd: master 6702e620

2020-03-26 20:08

Christian Grothoff


Details Diff
fix 0006135 Affected Issues
0006135
mod - src/microhttpd/internal.h Diff File

Issue History

Date Modified Username Field Change
2020-03-24 22:02 bkuhls New Issue
2020-03-24 22:02 bkuhls File Added: 0001-daemon.c-fix-non-threaded-build.patch
2020-03-26 19:13 Christian Grothoff Note Added: 0015465
2020-03-26 19:13 Christian Grothoff Assigned To => Christian Grothoff
2020-03-26 19:13 Christian Grothoff Status new => resolved
2020-03-26 19:13 Christian Grothoff Resolution open => fixed
2020-03-26 19:13 Christian Grothoff Fixed in Version => 0.9.71
2020-03-26 19:13 Christian Grothoff Target Version => 0.9.71
2020-06-28 21:57 Christian Grothoff Status resolved => closed
2021-09-02 17:54 Christian Grothoff Changeset attached => libmicrohttpd master 6702e620
2021-09-02 17:54 Christian Grothoff Note Added: 0018168