@ygj6 reported:
"My platform is MacOS 10.13.5, This problem only happens on Mac.
As written in the file CMakeLists.txt, the minimum required version of cmake is 3.1:
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
So I built this project with cmake-3.1.0, but I got the following errors:
CMake Error at /usr/local/cmake-3.1.0/share/cmake/Modules/FindOpenSSL.cmake:293 (list):
list GET given empty list
Call Stack (most recent call first):
CMakeLists.txt:824 (find_package)
CMake Error at /usr/local/cmake-3.1.0/share/cmake/Modules/FindOpenSSL.cmake:294 (list):
list GET given empty list
Call Stack (most recent call first):
CMakeLists.txt:824 (find_package)
CMake Error at /usr/local/cmake-3.1.0/share/cmake/Modules/FindOpenSSL.cmake:296 (list):
list GET given empty list
Call Stack (most recent call first):
CMakeLists.txt:824 (find_package)
CMake Error at /usr/local/cmake-3.1.0/share/cmake/Modules/FindOpenSSL.cmake:298 (list):
list GET given empty list
Call Stack (most recent call first):
CMakeLists.txt:824 (find_package)
I googled this error and got this answer:
https://bugs.archlinux.org/task/43688
It is a bug in FindOpenSSL.cmake on cmake-3.1.0 and fixed on cmake-3.1.2 .
Of course, It was successful when rebuilding with cmake-3.1.2 .
So I suggest setting the minimum version required for cmake to 3.1.2 or higher.
"
Closes: #845
Refs: de4ccee75a
This will allow to customize SO_RCVBUF/SO_SNDBUF for nameservers in this
evdns_base, you may want to adjust them if the kernel starts dropping
udp packages.
Since commit 506df426dbeb0187bbd3654bd286b4100628fb16, OPENSSL_INCS is
added to CPPFLAGS without any white space, as a result openssl detection
fails on:
configure:10395: checking openssl/ssl.h usability
configure:10395: /home/fabrice/buildroot-test/buildroot/output/host/bin/riscv32-linux-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -Wall -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64-I/home/fabrice/buildroot-test/buildroot/output/host/bin/../riscv32-buildroot-linux-gnu/sysroot/usr/include conftest.c >&5
<command-line>:0:0: warning: "_FILE_OFFSET_BITS" redefined
<command-line>:0:0: note: this is the location of the previous definition
<command-line>:0:23: error: division by zero in #if
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
When connecting to a non-existent HTTPS service, the "req" is not null
but the "evhttp_request_get_response_code(req)" is zero.
Closes: #822 (cherry-picked)
* evbuffer-fixes-806-v2:
evbuffer: fix last_with_datap after prepend with empty chain
test: regression for evbuffer_expand_fast_() with invalid last_with_datap
test: cover adjusting of last_with_datap in evbuffer_prepend()
Fixes: #806
Before the fix:
$ regress --no-fork evbuffer/reserve_invalid_last_with_datap
evbuffer/empty_chain_expand: [err] ../buffer.c:2138: Assertion chain == buf->first failed in evbuffer_expand_fast_
Aborted (core dumped)
This is the a shorter version of test from the #806 (with some
comments).
* issue-807-accept4-getnameinfo-AF_UNIX:
http-server: add usage/help dialog
http: avoid use of uninitialized value for AF_UNIX/AF_LOCAL sockaddr
http-server: add ability to bind to unix-socket
build: struct sockaddr_un detection (sys/un.h, afunix.h)
Fixes: #807
As ploxiln pointed out in pull request 811 the check "newsize < 0"
is undefined behaviour (signed int overflow).
Follow the advice and check kqop->changes_size instead.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Closes: #813 (cherry-picked)
On amd64 systems with kqueue (e.g. *BSD systems) an integer overflow
could be triggered with an excessively huge amount of events.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
If slot is larger than INT_MAX / 2, then the loop which increases
nentries until it is larger than slot would never return.
Also make sure that nentries * msize will never overflow INT_MAX.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
It doesn't make sense to allow a signal number higher than NSIG.
The NSIG check already exists in signal.c for internally used
functions.
As this is a programming error of libevent consumers, this is a
purely defensive mechanism.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Converting unsigned to size_t for size of memory objects allows
proper handling of very large heaps on 64 bit systems.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Closes: #799 (cherry-picked)
There was a race between event_base_loop and evwatch_new (adding a
prepare/check watcher while iterating over the watcher list). Only
release the mutex immediately before invoking each watcher callback,
and reacquire it immediately afterwards (same as is done for normal
event handlers).
User can define his own response method by calling
evhttp_set_ext_method_cmp() on the struct http, or
evhttp_connection_set_ext_method_cmp() on the connection.
We expose a new stucture `evhttp_ext_method` which is passed to the
callback if it's set. So any field can be modified, with some exceptions
(in evhttp_method_):
If the cmp function is set, it has the ability to modify method, and
flags. Other fields will be ignored. Flags returned are OR'd with the
current flags.
Based on changes to the #282 from: Mark Ellzey <socket@gmail.com>
From the server perspective the evhttp_response_phrase_internal() should
not be called with 0 before this patch, it will be called with
EVHTTP_REQ_UNKNOWN_ hence this patch should not change behavior.
Fixes: 68eb526d7b ("http: add WebDAV methods support")
Fixes: #789Fixes: #796
Reported-by: Thomas Bernard <miniupnp@free.fr>
Adds two new callbacks: "prepare" watchers, which fire immediately
before we poll for I/O, and "check" watchers, which fire immediately
after we finish polling and before we process events. This allows other
event loops to be embedded into libevent's, and enables certain
performance monitoring.
Closes: #710
To avoid possible confusion
But there is still one test that has some messages on windows:
main/methods
Because this test needs >1 of avaiable methods, otherwise it will warn.