From 80b3a1478d13fcf2ddae6e2b759cfb49f002f96d Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Fri, 27 Nov 2020 17:24:39 +0100 Subject: [PATCH] fix alloca usage --- CMake/_Include.cmake | 2 +- src/libmemcached/assert.hpp | 6 ++++++ src/libmemcachedutil/pool.cc | 1 - 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMake/_Include.cmake b/CMake/_Include.cmake index 6a5598d9..7c1b546d 100644 --- a/CMake/_Include.cmake +++ b/CMake/_Include.cmake @@ -115,7 +115,7 @@ configure_set(HAVE_FNV64_HASH ${ENABLE_HASH_FNV64}) configure_set(HAVE_MURMUR_HASH ${ENABLE_HASH_MURMUR}) configure_set(HAVE_HSIEH_HASH ${ENABLE_HASH_HSIEH}) -# most of the following checks are due to mingw or msvc; see gnulib +check_include(alloca.h) check_include(arpa/inet.h) check_include(dlfcn.h) check_include(netdb.h) diff --git a/src/libmemcached/assert.hpp b/src/libmemcached/assert.hpp index 4088c0f1..abad23d1 100644 --- a/src/libmemcached/assert.hpp +++ b/src/libmemcached/assert.hpp @@ -36,12 +36,18 @@ # ifdef __cplusplus # include +# include # include # else # include +# include # include # endif +# ifdef HAVE_ALLOCA_H +# include +# endif + # include "libmemcached/backtrace.hpp" # define assert_msg(__expr, __mesg) \ diff --git a/src/libmemcachedutil/pool.cc b/src/libmemcachedutil/pool.cc index c2185141..7a601d13 100644 --- a/src/libmemcachedutil/pool.cc +++ b/src/libmemcachedutil/pool.cc @@ -15,7 +15,6 @@ #include "libmemcachedutil/common.h" -#include #include #include #include -- 2.30.2