aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2021-09-02 14:58:10 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2021-09-02 14:58:10 +0300
commit7be09c451202bbe39e11e81348edb1aae8fdb122 (patch)
tree04f08a847bca14fd56c7161c12f100d4be48039e
parentd8cc7c50f0b47ba8fe1d36bd9f76a125c5e767d5 (diff)
downloadlibmicrohttpd-7be09c451202bbe39e11e81348edb1aae8fdb122.tar.gz
libmicrohttpd-7be09c451202bbe39e11e81348edb1aae8fdb122.zip
Fixed possible preprocessor error if ULLONG_MAX is not digits-only
-rw-r--r--configure.ac1
-rw-r--r--src/microhttpd/daemon.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 3ee40378..49556ebd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1117,6 +1117,7 @@ AC_CHECK_SIZEOF([size_t], [],
1117#include <stdio.h> 1117#include <stdio.h>
1118 ]] 1118 ]]
1119) 1119)
1120AC_CHECK_SIZEOF([unsigned long long], [], [[#include <stdint.h>]])
1120 1121
1121AC_CHECK_HEADERS([dlfcn.h],[have_tlsplugin=yes],[have_tlsplugin=no], [AC_INCLUDES_DEFAULT]) 1122AC_CHECK_HEADERS([dlfcn.h],[have_tlsplugin=yes],[have_tlsplugin=no], [AC_INCLUDES_DEFAULT])
1122AM_CONDITIONAL([MHD_HAVE_TLS_PLUGIN], [[test "x$have_tlsplugin" = xyes]]) 1123AM_CONDITIONAL([MHD_HAVE_TLS_PLUGIN], [[test "x$have_tlsplugin" = xyes]])
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index faf12c08..679bfbcb 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -3921,7 +3921,7 @@ MHD_get_timeout (struct MHD_Daemon *daemon,
3921 const uint64_t mssecond_left = earliest_tmot_conn->connection_timeout_ms 3921 const uint64_t mssecond_left = earliest_tmot_conn->connection_timeout_ms
3922 - since_actv; 3922 - since_actv;
3923 3923
3924#if UINT64_MAX != ULLONG_MAX 3924#if SIZEOF_UINT64_T > SIZEOF_UNSIGNED_LONG_LONG
3925 if (mssecond_left > ULLONG_MAX) 3925 if (mssecond_left > ULLONG_MAX)
3926 *timeout = ULLONG_MAX; 3926 *timeout = ULLONG_MAX;
3927 else 3927 else