Hello community,

here is the log from the commit of package libevent for openSUSE:Factory 
checked in at 2019-09-05 12:31:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libevent (Old)
 and      /work/SRC/openSUSE:Factory/.libevent.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libevent"

Thu Sep  5 12:31:48 2019 rev:38 rq:725008 version:2.1.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/libevent/libevent.changes        2019-07-13 
13:35:34.523317051 +0200
+++ /work/SRC/openSUSE:Factory/.libevent.new.7948/libevent.changes      
2019-09-05 12:31:51.863602155 +0200
@@ -1,0 +2,19 @@
+Tue Aug 20 22:27:52 UTC 2019 - David Disseldorp <[email protected]>
+
+- Update to 2.1.11 stable
+  * Fix ABI breakage that had been introduced in 2.1.10. Strictly speaking
+    this release breaks ABI again to make it compatible with <= 2.1.9.
+    + See git commit 18104973 for more details
+  * evdns: add new options -- so-rcvbuf/so-sndbuf
+  * various autotools and cmake build changes
+  * buffer: fix possible NULL dereference in evbuffer_setcb() on ENOMEM
+  * Warn if forked from the event loop during event_reinit()
+  * evutil: set the have_checked_interfaces in evutil_check_interfaces()
+  * https-client: correction error checking
+
+-------------------------------------------------------------------
+Fri Aug  2 07:05:45 UTC 2019 - Martin Liška <[email protected]>
+
+- Use FAT LTO objects in order to provide proper static library.
+
+-------------------------------------------------------------------

Old:
----
  libevent-2.1.10-stable.tar.gz
  libevent-2.1.10-stable.tar.gz.asc

New:
----
  libevent-2.1.11-stable.tar.gz
  libevent-2.1.11-stable.tar.gz.asc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libevent.spec ++++++
--- /var/tmp/diff_new_pack.wJqg8X/_old  2019-09-05 12:31:52.459602038 +0200
+++ /var/tmp/diff_new_pack.wJqg8X/_new  2019-09-05 12:31:52.463602038 +0200
@@ -19,8 +19,8 @@
 Name:           libevent
 %define     version_base 2
 %define     version_minor 1
-%define     version_release 10
-%define     abi_release 6
+%define     version_release 11
+%define     abi_release 7
 %define     version_suffix stable
 %define     libsoname %{name}-%{version_base}_%{version_minor}-%{abi_release}
 
@@ -116,6 +116,7 @@
 %patch0 -p1
 
 %build
+%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
 ./autogen.sh
 %configure \
        --disable-libevent-regress

++++++ baselibs.conf ++++++
--- /var/tmp/diff_new_pack.wJqg8X/_old  2019-09-05 12:31:52.491602032 +0200
+++ /var/tmp/diff_new_pack.wJqg8X/_new  2019-09-05 12:31:52.491602032 +0200
@@ -1 +1 @@
-libevent-2_1-6
+libevent-2_1-7

++++++ libevent-2.1.10-stable.tar.gz -> libevent-2.1.11-stable.tar.gz ++++++
++++ 1870 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/CMakeLists.txt 
new/libevent-2.1.11-stable/CMakeLists.txt
--- old/libevent-2.1.10-stable/CMakeLists.txt   2019-05-25 23:15:35.000000000 
+0200
+++ new/libevent-2.1.11-stable/CMakeLists.txt   2019-08-01 23:24:25.000000000 
+0200
@@ -84,7 +84,14 @@
 set(EVENT_PACKAGE_VERSION
     "${EVENT_VERSION_MAJOR}.${EVENT_VERSION_MINOR}.${EVENT_VERSION_PATCH}")
 
-set(EVENT_NUMERIC_VERSION 0x02010a00)
+set(EVENT_NUMERIC_VERSION 0x02010b00)
+# equals to VERSION_INFO in Makefile.am
+set(EVENT_ABI_LIBVERSION_CURRENT   7)
+set(EVENT_ABI_LIBVERSION_REVISION  0)
+set(EVENT_ABI_LIBVERSION_AGE       0)
+
+# equals to RELEASE in Makefile.am
+set(EVENT_PACKAGE_RELEASE 2.1)
 
 # only a subset of names can be used, defaults to "beta"
 set(EVENT_STAGE_NAME ${EVENT_VERSION_STAGE})
@@ -322,7 +329,7 @@
 # Winsock.
 if(WIN32)
     set(CMAKE_EXTRA_INCLUDE_FILES winsock2.h ws2tcpip.h)
-    set(CMAKE_REQUIRED_LIBRARIES  ws2_32.lib)
+    set(CMAKE_REQUIRED_LIBRARIES  ws2_32.lib shell32.lib advapi32.lib)
     set(CMAKE_REQUIRED_DEFINITIONS -FIwinsock2.h -FIws2tcpip.h)
 endif()
 if (SOLARIS)
@@ -337,6 +344,10 @@
     unset(_GNU_SOURCE CACHE)
     CHECK_SYMBOL_EXISTS(_GNU_SOURCE "features.h" _GNU_SOURCE)
   endif()
+
+  if (ANDROID)
+    set(_GNU_SOURCE TRUE)
+  endif()
 endif()
 
 if (_GNU_SOURCE)
@@ -626,7 +637,7 @@
 
 # Verify kqueue works with pipes.
 if (EVENT__HAVE_KQUEUE)
-    if (CMAKE_CROSSCOMPILING AND NOT EVENT__FORCE_KQUEUE_CHECK)
+    if ((CMAKE_CROSSCOMPILING OR APPLE) AND NOT EVENT__FORCE_KQUEUE_CHECK)
         message(WARNING "Cannot check if kqueue works with pipes when 
crosscompiling, use EVENT__FORCE_KQUEUE_CHECK to be sure (this requires 
manually running a test program on the cross compilation target)")
         set(EVENT__HAVE_WORKING_KQUEUE 1)
     else()
@@ -873,7 +884,7 @@
     list(APPEND HDR_PRIVATE WIN32-Code/getopt.h)
 
     set(EVENT__DNS_USE_FTIME_FOR_ID 1)
-    set(LIB_PLATFORM ws2_32)
+    set(LIB_PLATFORM ws2_32 shell32 advapi32)
     add_definitions(
             -D_CRT_SECURE_NO_WARNINGS
             -D_CRT_NONSTDC_NO_DEPRECATE)
@@ -1465,6 +1476,33 @@
         DESTINATION "${DEF_INSTALL_CMAKE_DIR}"
         COMPONENT dev)
 
+# Install the scripts.
+install(PROGRAMS
+       ${CMAKE_CURRENT_SOURCE_DIR}/event_rpcgen.py
+       DESTINATION "bin"
+       COMPONENT runtime)
+
+# Create documents with doxygen.
+find_program(DOXYGEN doxygen)
+if (DOXYGEN)
+    add_custom_target(doxygen
+                      COMMAND ${DOXYGEN} Doxyfile
+                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+else()
+    message(WARNING "The doxygen target will not support since doxygen command 
was not found!")
+endif()
+
+
+# Create the uninstall target.
+# 
https://gitlab.kitware.com/cmake/community/wikis/FAQ#can-i-do-make-uninstall-with-cmake
+configure_file(${PROJECT_SOURCE_DIR}/cmake/Uninstall.cmake.in
+               ${PROJECT_BINARY_DIR}/Uninstall.cmake
+               @ONLY)
+
+add_custom_target(uninstall
+                  COMMAND ${CMAKE_COMMAND} -P 
${PROJECT_BINARY_DIR}/Uninstall.cmake)
+
+
 message(STATUS "")
 message(STATUS "        ---( Libevent " ${EVENT_VERSION} " )---")
 message(STATUS "")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/ChangeLog new/libevent-2.1.11-stable/ChangeLog
--- old/libevent-2.1.10-stable/ChangeLog        2019-05-25 23:15:35.000000000 
+0200
+++ new/libevent-2.1.11-stable/ChangeLog        2019-08-01 23:20:28.000000000 
+0200
@@ -1,3 +1,49 @@
+Changes in version 2.1.11-stable (01 Aug 2019)
+
+ This release contains one ABI breakage fix (that had been introduced in
+ 2.1.10, and strictly speaking this release breaks ABI again to make it
+ compatible with 2.1.9 and less, please take a look at 18104973 for more
+ details). Apart from that it contains some bug fixes, that grouped below.
+
+ And even though the return value for evbuffer_setcb() had been changed it
+ should ABI compatible (anyway that function is in -compat.h header).
+
+ There is also one patch that introduce new functionality, this is 546a366c,
+ to tune SO_RCVBUF/SO_SNDBUF in evdns, but one can count it as a bug-fix on
+ the application level, since before you cannot tune this settings and hence
+ you could stumble on problems.
+
+ ABI breakage:
+  o Protect min_heap_push_ against integer overflow. (8c899768 Tobias 
Stoeckmann)
+  o Revert "Protect min_heap_push_ against integer overflow." (18104973 Azat 
Khuzhin)
+
+ functionality:
+  o evdns: add new options -- so-rcvbuf/so-sndbuf (546a366c Azat Khuzhin)
+
+ build:
+  o Change autoconf version to 2.62 and automake version to 1.11.2 (2a333008 
yuangongji)
+  o cmake: install shared library only if it was requested (596855f7 Azat 
Khuzhin)
+  o Missing <winerror.h> on win7/MinGW(MINGW32_NT-6.1)/MSYS (9559349c 
yuangongji)
+  o cmake: set library names to be the same as with autotools (305251b9 
yuangongji)
+  o Enable _GNU_SOURCE for Android (f013fc7d Keith Smiley)
+  o Enable kqueue for APPLE targets (3aa68a82 Keith Smiley)
+  o autotools: do not install bufferevent_ssl.h under --disable-openssl 
(5349a07e Azat Khuzhin)
+  o cmake: link against shell32.lib/advapi32.lib (c9ce638c Azat Khuzhin)
+  o Add README.md into dist archive (3660a4cc Azat Khuzhin)
+  o cmake: add missing autotools targets (doxygen, uninstall, event_rpcgen.py) 
(2d65071c yuangongji)
+  o m4/libevent_openssl.m4: fix detection of openssl (d4056e59 Fabrice 
Fontaine)
+  o Fix detection of the __has_attribute() for apple clang [ci skip] (7fd7c5ef 
Azat Khuzhin)
+
+ lib:
+  o buffer: fix possible NULL dereference in evbuffer_setcb() on ENOMEM 
(598f247d Azat Khuzhin)
+  o Warn if forked from the event loop during event_reinit() (b75922ae Azat 
Khuzhin)
+  o evutil: set the have_checked_interfaces in evutil_check_interfaces()
+    (ef498aa2, a09265ac jeremyerb)
+
+ samples:
+  o https-client: correction error checking (a8a04565 wenyg)
+
+
 Changes in version 2.1.10-stable (26 May 2019)
 
  This release contains mostly fixes (some evbuffer oddity, AF_UNIX handling in
@@ -9,7 +55,7 @@
  trivial fixes pruned out from it - to make it a little bit more informative).
 
  To view full changelog please use git:
-   git log --format='  o %s (%h %aN)' release-2.1.8-stable...release-2.1.9-beta
+   git log --format='  o %s (%h %aN)' 
release-2.1.9-beta...release-2.1.10-stable
 
  dist:
   o Add getopt into dist archive (7042ff24 Azat Khuzhin)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/Makefile.am new/libevent-2.1.11-stable/Makefile.am
--- old/libevent-2.1.10-stable/Makefile.am      2019-05-25 23:15:35.000000000 
+0200
+++ new/libevent-2.1.11-stable/Makefile.am      2019-08-01 23:26:18.000000000 
+0200
@@ -5,8 +5,8 @@
 # See LICENSE for copying information.
 
 # 'foreign' means that we're not enforcing GNU package rules strictly.
-# '1.9' means that we need automake 1.9 or later (and we do).
-AUTOMAKE_OPTIONS = foreign 1.9 subdir-objects
+# '1.11.2' means that we need automake 1.11.2 or later (and we do).
+AUTOMAKE_OPTIONS = foreign 1.11.2 subdir-objects
 
 ACLOCAL_AMFLAGS = -I m4
 
@@ -38,7 +38,7 @@
 #
 # Once an RC is out, DO NOT MAKE ANY ABI-BREAKING CHANGES IN THAT SERIES
 # UNLESS YOU REALLY REALLY HAVE TO.
-VERSION_INFO = 6:4:0
+VERSION_INFO = 7:0:0
 
 # History:          RELEASE    VERSION_INFO
 #  2.0.1-alpha --     2.0        1:0:0
@@ -73,7 +73,8 @@
 #  2.1.7-beta  --     2.1        6:1:0 (ABI changed slightly)
 #  2.1.8-stable--     2.1        6:2:0 (No ABI change)
 #  2.1.9-beta--       2.1        6:3:0 (No ABI change)
-#  2.1.10-stable--    2.1        6:4:0 (No ABI change)
+#  2.1.10-stable--    2.1        6:4:0 (No ABI change, WRONG)
+#  2.1.11-stable--    2.1        7:0:0 (ABI changed)
 
 # ABI version history for this package effectively restarts every time
 # we change RELEASE.  Version 1.4.x had RELEASE of 1.4.
@@ -142,6 +143,7 @@
        make-event-config.sed \
        whatsnew-2.0.txt \
        whatsnew-2.1.txt \
+       README.md \
        $(CMAKE_FILES) \
        $(PLATFORM_DEPENDENT_SRC)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/README.md new/libevent-2.1.11-stable/README.md
--- old/libevent-2.1.10-stable/README.md        1970-01-01 01:00:00.000000000 
+0100
+++ new/libevent-2.1.11-stable/README.md        2019-08-01 23:12:07.000000000 
+0200
@@ -0,0 +1,469 @@
+<p align="center">
+  <img src="https://strcpy.net/libevent3.png"; alt="libevent logo"/>
+</p>
+
+
+
+[![Appveyor Win32 Build 
Status](https://ci.appveyor.com/api/projects/status/ng3jg0uhy44mp7ik?svg=true)](https://ci.appveyor.com/project/libevent/libevent)
+[![Travis Build 
Status](https://travis-ci.org/libevent/libevent.svg?branch=master)](https://travis-ci.org/libevent/libevent)
+[![Coverage 
Status](https://coveralls.io/repos/github/libevent/libevent/badge.svg)](https://coveralls.io/github/libevent/libevent)
+[![Join the chat at 
https://gitter.im/libevent/libevent](https://badges.gitter.im/libevent/libevent.svg)](https://gitter.im/libevent/libevent?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+
+
+
+# 0. BUILDING AND INSTALLATION (Briefly)
+
+## Autoconf
+
+     $ ./configure
+     $ make
+     $ make verify   # (optional)
+     $ sudo make install
+
+## CMake (General)
+
+
+The following Libevent specific CMake variables are as follows (the values 
being
+the default).
+
+```
+# Type of the library to build (SHARED or STATIC)
+# Default is: SHARED for MSVC, otherwise BOTH
+EVENT__LIBRARY_TYPE:STRING=DEFAULT
+
+# Installation directory for CMake files
+EVENT_INSTALL_CMAKE_DIR:PATH=lib/cmake/libevent
+
+# Enable running gcov to get a test coverage report (only works with
+# GCC/CLang). Make sure to enable -DCMAKE_BUILD_TYPE=Debug as well.
+EVENT__COVERAGE:BOOL=OFF
+
+# Defines if Libevent should build without the benchmark executables
+EVENT__DISABLE_BENCHMARK:BOOL=OFF
+
+# Define if Libevent should build without support for a debug mode
+EVENT__DISABLE_DEBUG_MODE:BOOL=OFF
+
+# Define if Libevent should not allow replacing the mm functions
+EVENT__DISABLE_MM_REPLACEMENT:BOOL=OFF
+
+# Define if Libevent should build without support for OpenSSL encryption
+EVENT__DISABLE_OPENSSL:BOOL=OFF
+
+# Disable the regress tests
+EVENT__DISABLE_REGRESS:BOOL=OFF
+
+# Disable sample files
+EVENT__DISABLE_SAMPLES:BOOL=OFF
+
+# If tests should be compiled or not
+EVENT__DISABLE_TESTS:BOOL=OFF
+
+# Define if Libevent should not be compiled with thread support
+EVENT__DISABLE_THREAD_SUPPORT:BOOL=OFF
+
+# Enables verbose debugging
+EVENT__ENABLE_VERBOSE_DEBUG:BOOL=OFF
+
+# When cross compiling, forces running a test program that verifies that Kqueue
+# works with pipes. Note that this requires you to manually run the test 
program
+# on the the cross compilation target to verify that it works. See CMake
+# documentation for try_run for more details
+EVENT__FORCE_KQUEUE_CHECK:BOOL=OFF
+```
+
+__More variables can be found by running `cmake -LAH <sourcedir_path>`__
+
+
+## CMake (Windows)
+
+Install CMake: <https://www.cmake.org>
+
+
+     $ md build && cd build
+     $ cmake -G "Visual Studio 10" ..   # Or whatever generator you want to 
use cmake --help for a list.
+     $ start libevent.sln
+
+## CMake (Unix)
+
+     $ mkdir build && cd build
+     $ cmake ..     # Default to Unix Makefiles.
+     $ make
+     $ make verify  # (optional)
+
+
+# 1. BUILDING AND INSTALLATION (In Depth)
+
+## Autoconf
+
+To build Libevent, type
+
+     $ ./configure && make
+
+
+ (If you got Libevent from the git repository, you will
+  first need to run the included "autogen.sh" script in order to
+  generate the configure script.)
+
+You can run the regression tests by running
+
+     $ make verify
+
+Install as root via
+
+     $ make install
+
+Before reporting any problems, please run the regression tests.
+
+To enable low-level tracing, build the library as:
+
+     $ CFLAGS=-DUSE_DEBUG ./configure [...]
+
+Standard configure flags should work.  In particular, see:
+
+     --disable-shared          Only build static libraries.
+     --prefix                  Install all files relative to this directory.
+
+
+The configure script also supports the following flags:
+
+     --enable-gcc-warnings     Enable extra compiler checking with GCC.
+     --disable-malloc-replacement
+                               Don't let applications replace our memory
+                               management functions.
+     --disable-openssl         Disable support for OpenSSL encryption.
+     --disable-thread-support  Don't support multithreaded environments.
+
+## CMake (Windows)
+
+(Note that autoconf is currently the most mature and supported build
+environment for Libevent; the CMake instructions here are new and
+experimental, though they _should_ be solid.  We hope that CMake will
+still be supported in future versions of Libevent, and will try to
+make sure that happens.)
+
+First of all install <https://www.cmake.org>.
+
+To build Libevent using Microsoft Visual studio open the "Visual Studio 
Command prompt" and type:
+
+```
+$ cd <libevent source dir>
+$ mkdir build && cd build
+$ cmake -G "Visual Studio 10" ..   # Or whatever generator you want to use 
cmake --help for a list.
+$ start libevent.sln
+```
+
+In the above, the ".." refers to the dir containing the Libevent source code. 
+You can build multiple versions (with different compile time settings) from 
the same source tree
+by creating other build directories. 
+
+It is highly recommended to build "out of source" when using
+CMake instead of "in source" like the normal behaviour of autoconf for this 
reason.
+
+The "NMake Makefiles" CMake generator can be used to build entirely via the 
command line.
+
+To get a list of settings available for the project you can type:
+
+```
+$ cmake -LH ..
+```
+
+### GUI
+
+CMake also provides a GUI that lets you specify the source directory and 
output (binary) directory
+that the build should be placed in.
+
+# 2. USEFUL LINKS:
+
+For the latest released version of Libevent, see the official website at
+<http://libevent.org/> .
+
+There's a pretty good work-in-progress manual up at
+   <http://www.wangafu.net/~nickm/libevent-book/> .
+
+For the latest development versions of Libevent, access our Git repository
+via
+
+```
+$ git clone https://github.com/libevent/libevent.git
+```
+
+You can browse the git repository online at:
+
+<https://github.com/libevent/libevent>
+
+To report bugs, issues, or ask for new features:
+
+__Patches__: https://github.com/libevent/libevent/pulls
+> OK, those are not really _patches_. You fork, modify, and hit the "Create 
Pull Request" button.
+> You can still submit normal git patches via the mailing list.
+
+__Bugs, Features [RFC], and Issues__: 
https://github.com/libevent/libevent/issues
+> Or you can do it via the mailing list.
+
+There's also a libevent-users mailing list for talking about Libevent
+use and development: 
+
+<http://archives.seul.org/libevent/users/>
+
+# 3. ACKNOWLEDGMENTS
+
+The following people have helped with suggestions, ideas, code or
+fixing bugs:
+
+ * Samy Al Bahra
+ * Antony Antony
+ * Jacob Appelbaum
+ * Arno Bakker
+ * Weston Andros Adamson
+ * William Ahern
+ * Ivan Andropov
+ * Sergey Avseyev
+ * Avi Bab
+ * Joachim Bauch
+ * Andrey Belobrov
+ * Gilad Benjamini
+ * Stas Bekman
+ * Denis Bilenko
+ * Julien Blache
+ * Kevin Bowling
+ * Tomash Brechko
+ * Kelly Brock
+ * Ralph Castain
+ * Adrian Chadd
+ * Lawnstein Chan
+ * Shuo Chen
+ * Ka-Hing Cheung
+ * Andrew Cox
+ * Paul Croome
+ * George Danchev
+ * Andrew Danforth
+ * Ed Day
+ * Christopher Davis
+ * Mike Davis
+ * Frank Denis
+ * Antony Dovgal
+ * Mihai Draghicioiu
+ * Alexander Drozdov
+ * Mark Ellzey
+ * Shie Erlich
+ * Leonid Evdokimov
+ * Juan Pablo Fernandez
+ * Christophe Fillot
+ * Mike Frysinger
+ * Remi Gacogne
+ * Artem Germanov
+ * Alexander von Gernler
+ * Diego Giagio
+ * Artur Grabowski
+ * Diwaker Gupta
+ * Kuldeep Gupta
+ * Sebastian Hahn
+ * Dave Hart
+ * Greg Hazel
+ * Nicholas Heath
+ * Michael Herf
+ * Savg He
+ * Mark Heily
+ * Maxime Henrion
+ * Michael Herf
+ * Greg Hewgill
+ * Andrew Hochhaus
+ * Aaron Hopkins
+ * Tani Hosokawa
+ * Jamie Iles
+ * Xiuqiang Jiang
+ * Claudio Jeker
+ * Evan Jones
+ * Marcin Juszkiewicz
+ * George Kadianakis
+ * Makoto Kato
+ * Phua Keat
+ * Azat Khuzhin
+ * Alexander Klauer
+ * Kevin Ko
+ * Brian Koehmstedt
+ * Marko Kreen
+ * Ondřej Kuzník
+ * Valery Kyholodov
+ * Ross Lagerwall
+ * Scott Lamb
+ * Christopher Layne
+ * Adam Langley
+ * Graham Leggett
+ * Volker Lendecke
+ * Philip Lewis
+ * Zhou Li
+ * David Libenzi
+ * Yan Lin
+ * Moshe Litvin
+ * Simon Liu
+ * Mitchell Livingston
+ * Hagne Mahre
+ * Lubomir Marinov
+ * Abilio Marques
+ * Nicolas Martyanoff
+ * Abel Mathew
+ * Nick Mathewson
+ * James Mansion
+ * Nicholas Marriott
+ * Andrey Matveev
+ * Caitlin Mercer
+ * Dagobert Michelsen
+ * Andrea Montefusco
+ * Mansour Moufid
+ * Mina Naguib
+ * Felix Nawothnig
+ * Trond Norbye
+ * Linus Nordberg
+ * Richard Nyberg
+ * Jon Oberheide
+ * John Ohl
+ * Phil Oleson
+ * Alexey Ozeritsky
+ * Dave Pacheco
+ * Derrick Pallas
+ * Tassilo von Parseval
+ * Catalin Patulea
+ * Patrick Pelletier
+ * Simon Perreault
+ * Dan Petro
+ * Pierre Phaneuf
+ * Amarin Phaosawasdi
+ * Ryan Phillips
+ * Dimitre Piskyulev
+ * Pavel Plesov
+ * Jon Poland
+ * Roman Puls
+ * Nate R
+ * Robert Ransom
+ * Balint Reczey
+ * Bert JW Regeer
+ * Nate Rosenblum
+ * Peter Rosin
+ * Maseeb Abdul Qadir
+ * Wang Qin
+ * Alex S
+ * Gyepi Sam
+ * Hanna Schroeter
+ * Ralf Schmitt
+ * Mike Smellie
+ * Steve Snyder
+ * Nir Soffer
+ * Dug Song
+ * Dongsheng Song
+ * Hannes Sowa
+ * Joakim Soderberg
+ * Joseph Spadavecchia
+ * Kevin Springborn
+ * Harlan Stenn
+ * Andrew Sweeney
+ * Ferenc Szalai
+ * Brodie Thiesfield
+ * Jason Toffaletti
+ * Brian Utterback
+ * Gisle Vanem
+ * Bas Verhoeven
+ * Constantine Verutin
+ * Colin Watt
+ * Zack Weinberg
+ * Jardel Weyrich
+ * Jay R. Wren
+ * Zack Weinberg
+ * Mobai Zhang
+ * Alejo
+ * Alex
+ * Taral
+ * propanbutan
+ * masksqwe
+ * mmadia
+ * yangacer
+ * Andrey Skriabin
+ * basavesh.as
+ * billsegall
+ * Bill Vaughan
+ * Christopher Wiley
+ * David Paschich
+ * Ed Schouten
+ * Eduardo Panisset
+ * Jan Heylen
+ * jer-gentoo
+ * Joakim Söderberg
+ * kirillDanshin
+ * lzmths
+ * Marcus Sundberg
+ * Mark Mentovai
+ * Mattes D
+ * Matyas Dolak
+ * Neeraj Badlani
+ * Nick Mathewson
+ * Rainer Keller
+ * Seungmo Koo
+ * Thomas Bernard
+ * Xiao Bao Clark
+ * zeliard
+ * Zonr Chang
+ * Kurt Roeckx
+ * Seven
+ * Simone Basso
+ * Vlad Shcherban
+ * Tim Hentenaar
+ * Breaker
+ * johnsonlee
+ * Philip Prindeville
+ * Vis Virial
+ * Andreas Gustafsson
+ * Andrey Okoshkin
+ * an-tao
+ * baixiangcpp
+ * Bernard Spil
+ * Bogdan Harjoc
+ * Carlo Marcelo Arenas Belón
+ * David Benjamin
+ * David Disseldorp
+ * Dmitry Alimov
+ * Dominic Chen
+ * dpayne
+ * ejurgensen
+ * Fredrik Strupe
+ * Gonçalo Ribeiro
+ * James Synge
+ * Jan Beich
+ * Jesse Fang
+ * Jiri Luznicky
+ * José Luis Millán
+ * Kiyoshi Aman
+ * Leo Zhang
+ * lightningkay
+ * Luke Dashjr
+ * Marcin Szewczyk
+ * Maximilian Brunner
+ * Maya Rashish
+ * Murat Demirten
+ * Nathan French
+ * Nikolay Edigaryev
+ * Philip Herron
+ * Redfoxmoon
+ * stenn
+ * SuckShit
+ * The Gitter Badger
+ * tim-le
+ * Vincent JARDIN
+ * Xiang Zhang
+ * Xiaozhou Liu
+ * yongqing.jiao
+ * Enji Cooper
+ * linxiaohui
+ * Seong-Joong Kim
+ * Tobias Stoeckmann
+ * Yury Korzhetsky
+ * zhuizhuhaomeng
+ * Pierce Lopez
+ * yuangongji
+ * Keith Smiley
+ * jeremyerb
+ * Fabrice Fontaine
+ * wenyg
+
+
+If we have forgotten your name, please contact us.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/WIN32-Code/nmake/event2/event-config.h 
new/libevent-2.1.11-stable/WIN32-Code/nmake/event2/event-config.h
--- old/libevent-2.1.10-stable/WIN32-Code/nmake/event2/event-config.h   
2019-05-25 23:15:35.000000000 +0200
+++ new/libevent-2.1.11-stable/WIN32-Code/nmake/event2/event-config.h   
2019-08-01 23:24:53.000000000 +0200
@@ -271,7 +271,7 @@
 /* #undef EVENT__HAVE_WORKING_KQUEUE */
 
 /* Numeric representation of the version */
-#define EVENT__NUMERIC_VERSION 0x02010a00
+#define EVENT__NUMERIC_VERSION 0x02010b00
 
 /* Name of package */
 #define EVENT__PACKAGE "libevent"
@@ -332,7 +332,7 @@
 #define EVENT__TIME_WITH_SYS_TIME 1
 
 /* Version number of package */
-#define EVENT__VERSION "2.1.10-stable"
+#define EVENT__VERSION "2.1.11-stable"
 
 /* Define to `__inline__' or `__inline' if that's what the C compiler
    calls it, or to nothing if 'inline' is not supported under any name.  */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/arc4random.c new/libevent-2.1.11-stable/arc4random.c
--- old/libevent-2.1.10-stable/arc4random.c     2019-05-25 23:15:35.000000000 
+0200
+++ new/libevent-2.1.11-stable/arc4random.c     2019-08-01 23:09:13.000000000 
+0200
@@ -54,6 +54,7 @@
 #ifdef _WIN32
 #include <wincrypt.h>
 #include <process.h>
+#include <winerror.h>
 #else
 #include <fcntl.h>
 #include <unistd.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/buffer.c new/libevent-2.1.11-stable/buffer.c
--- old/libevent-2.1.10-stable/buffer.c 2019-05-25 23:15:35.000000000 +0200
+++ new/libevent-2.1.11-stable/buffer.c 2019-08-01 23:09:13.000000000 +0200
@@ -3304,7 +3304,7 @@
        return r;
 }
 
-void
+int
 evbuffer_setcb(struct evbuffer *buffer, evbuffer_cb cb, void *cbarg)
 {
        EVBUFFER_LOCK(buffer);
@@ -3315,10 +3315,15 @@
        if (cb) {
                struct evbuffer_cb_entry *ent =
                    evbuffer_add_cb(buffer, NULL, cbarg);
+               if (!ent) {
+                       EVBUFFER_UNLOCK(buffer);
+                       return -1;
+               }
                ent->cb.cb_obsolete = cb;
                ent->flags |= EVBUFFER_CB_OBSOLETE;
        }
        EVBUFFER_UNLOCK(buffer);
+       return 0;
 }
 
 struct evbuffer_cb_entry *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/buffer_iocp.c 
new/libevent-2.1.11-stable/buffer_iocp.c
--- old/libevent-2.1.10-stable/buffer_iocp.c    2016-10-04 21:55:31.000000000 
+0200
+++ new/libevent-2.1.11-stable/buffer_iocp.c    2019-08-01 23:09:13.000000000 
+0200
@@ -44,6 +44,7 @@
 #include "mm-internal.h"
 
 #include <winsock2.h>
+#include <winerror.h>
 #include <windows.h>
 #include <stdio.h>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/bufferevent_async.c 
new/libevent-2.1.11-stable/bufferevent_async.c
--- old/libevent-2.1.10-stable/bufferevent_async.c      2019-02-03 
22:30:49.000000000 +0100
+++ new/libevent-2.1.11-stable/bufferevent_async.c      2019-08-01 
23:09:13.000000000 +0200
@@ -46,6 +46,7 @@
 
 #ifdef _WIN32
 #include <winsock2.h>
+#include <winerror.h>
 #include <ws2tcpip.h>
 #endif
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/cmake/AddEventLibrary.cmake 
new/libevent-2.1.11-stable/cmake/AddEventLibrary.cmake
--- old/libevent-2.1.10-stable/cmake/AddEventLibrary.cmake      2019-02-03 
22:30:49.000000000 +0100
+++ new/libevent-2.1.11-stable/cmake/AddEventLibrary.cmake      2019-08-01 
23:09:13.000000000 +0200
@@ -38,6 +38,10 @@
 
 # Global variables that it uses:
 # - EVENT_ABI_LIBVERSION
+# - EVENT_ABI_LIBVERSION_CURRENT
+# - EVENT_ABI_LIBVERSION_REVISION
+# - EVENT_ABI_LIBVERSION_AGE
+# - EVENT_PACKAGE_RELEASE
 # - CMAKE_THREAD_LIBS_INIT LIB_PLATFORM
 # - OPENSSL_LIBRARIES
 # - HDR_PUBLIC
@@ -87,16 +91,44 @@
             set_event_shared_lib_flags("${LIB_NAME}" "${EVENT_SHARED_FLAGS}")
         endif()
 
-        set_target_properties("${LIB_NAME}_shared" PROPERTIES
-            OUTPUT_NAME "${LIB_NAME}"
-            CLEAN_DIRECT_OUTPUT 1)
-        set_target_properties(
-            "${LIB_NAME}_shared" PROPERTIES
-            PUBLIC_HEADER "${HDR_PUBLIC}")
+        if (WIN32)
+            set_target_properties(
+                "${LIB_NAME}_shared" PROPERTIES
+                OUTPUT_NAME "${LIB_NAME}"
+                SOVERSION ${EVENT_ABI_LIBVERSION})
+        elseif (APPLE)
+            math(EXPR COMPATIBILITY_VERSION 
"${EVENT_ABI_LIBVERSION_CURRENT}+1")
+            math(EXPR CURRENT_MINUS_AGE 
"${EVENT_ABI_LIBVERSION_CURRENT}-${EVENT_ABI_LIBVERSION_AGE}")
+            set_target_properties(
+                "${LIB_NAME}_shared" PROPERTIES
+                OUTPUT_NAME 
"${LIB_NAME}-${EVENT_PACKAGE_RELEASE}.${CURRENT_MINUS_AGE}"
+                INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
+                LINK_FLAGS "-compatibility_version ${COMPATIBILITY_VERSION} 
-current_version ${COMPATIBILITY_VERSION}.${EVENT_ABI_LIBVERSION_REVISION}")
+        else()
+            math(EXPR CURRENT_MINUS_AGE 
"${EVENT_ABI_LIBVERSION_CURRENT}-${EVENT_ABI_LIBVERSION_AGE}")
+            set_target_properties(
+                "${LIB_NAME}_shared" PROPERTIES
+                OUTPUT_NAME "${LIB_NAME}-${EVENT_PACKAGE_RELEASE}"
+                VERSION 
"${CURRENT_MINUS_AGE}.${EVENT_ABI_LIBVERSION_AGE}.${EVENT_ABI_LIBVERSION_REVISION}"
+                SOVERSION "${CURRENT_MINUS_AGE}")
+        endif()
+
         set_target_properties(
             "${LIB_NAME}_shared" PROPERTIES
-            SOVERSION ${EVENT_ABI_LIBVERSION}
-        )
+            PUBLIC_HEADER "${HDR_PUBLIC}"
+            CLEAN_DIRECT_OUTPUT 1)
+
+        if (NOT WIN32)
+            set(LIB_LINK_NAME
+                
"${CMAKE_SHARED_LIBRARY_PREFIX}${LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}")
+
+            add_custom_command(TARGET ${LIB_NAME}_shared
+                POST_BUILD
+                COMMAND ${CMAKE_COMMAND} -E create_symlink
+                    "$<TARGET_FILE_NAME:${LIB_NAME}_shared>"
+                    "${LIB_LINK_NAME}"
+                WORKING_DIRECTORY "lib")
+        endif()
 
         list(APPEND LIBEVENT_SHARED_LIBRARIES "${LIB_NAME}_shared")
         list(APPEND ADD_EVENT_LIBRARY_TARGETS "${LIB_NAME}_shared")
@@ -117,6 +149,12 @@
         PUBLIC_HEADER DESTINATION "include/event2"
         COMPONENT dev
     )
+    if (NOT WIN32 AND ${EVENT_LIBRARY_SHARED})
+        install(FILES
+            "$<TARGET_FILE_DIR:${LIB_NAME}_shared>/${LIB_LINK_NAME}"
+            DESTINATION "lib"
+            COMPONENT lib)
+    endif()
 
     add_library(${LIB_NAME} INTERFACE)
     target_link_libraries(${LIB_NAME} INTERFACE ${ADD_EVENT_LIBRARY_INTERFACE})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/cmake/VersionViaGit.cmake 
new/libevent-2.1.11-stable/cmake/VersionViaGit.cmake
--- old/libevent-2.1.10-stable/cmake/VersionViaGit.cmake        2019-05-25 
23:15:35.000000000 +0200
+++ new/libevent-2.1.11-stable/cmake/VersionViaGit.cmake        2019-08-01 
23:25:13.000000000 +0200
@@ -23,8 +23,8 @@
        # set our defaults.
        set(EVENT_GIT___VERSION_MAJOR 2)
        set(EVENT_GIT___VERSION_MINOR 1)
-       set(EVENT_GIT___VERSION_PATCH 10)
-       set(EVENT_GIT___VERSION_STAGE "beta")
+       set(EVENT_GIT___VERSION_PATCH 11)
+       set(EVENT_GIT___VERSION_STAGE "stable")
 
        find_package(Git)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/configure.ac new/libevent-2.1.11-stable/configure.ac
--- old/libevent-2.1.10-stable/configure.ac     2019-05-25 23:15:35.000000000 
+0200
+++ new/libevent-2.1.11-stable/configure.ac     2019-08-01 23:25:23.000000000 
+0200
@@ -5,8 +5,8 @@
 dnl
 dnl Original version Dug Song <[email protected]>
 
-AC_INIT(libevent,2.1.10-stable)
-AC_PREREQ(2.59)
+AC_INIT(libevent,2.1.11-stable)
+AC_PREREQ(2.62)
 AC_CONFIG_SRCDIR(event.c)
 
 AC_CONFIG_MACRO_DIR([m4])
@@ -14,7 +14,7 @@
 dnl AM_SILENT_RULES req. automake 1.11.  [no] defaults V=1
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 AC_CONFIG_HEADERS(config.h  evconfig-private.h:evconfig-private.h.in)
-AC_DEFINE(NUMERIC_VERSION, 0x02010a00, [Numeric representation of the version])
+AC_DEFINE(NUMERIC_VERSION, 0x02010b00, [Numeric representation of the version])
 
 dnl Initialize prefix.
 if test "$prefix" = "NONE"; then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/evdns.c new/libevent-2.1.11-stable/evdns.c
--- old/libevent-2.1.10-stable/evdns.c  2019-05-25 23:15:35.000000000 +0200
+++ new/libevent-2.1.11-stable/evdns.c  2019-08-01 23:09:13.000000000 +0200
@@ -77,6 +77,7 @@
 #include <stdarg.h>
 #ifdef _WIN32
 #include <winsock2.h>
+#include <winerror.h>
 #include <ws2tcpip.h>
 #ifndef _WIN32_IE
 #define _WIN32_IE 0x400
@@ -346,6 +347,9 @@
 
        struct timeval global_getaddrinfo_allow_skew;
 
+       int so_rcvbuf;
+       int so_sndbuf;
+
        int getaddrinfo_ipv4_timeouts;
        int getaddrinfo_ipv6_timeouts;
        int getaddrinfo_ipv4_answered;
@@ -2538,6 +2542,23 @@
                }
        }
 
+       if (base->so_rcvbuf) {
+               if (setsockopt(ns->socket, SOL_SOCKET, SO_RCVBUF,
+                   (void *)&base->so_rcvbuf, sizeof(base->so_rcvbuf))) {
+                       log(EVDNS_LOG_WARN, "Couldn't set SO_RCVBUF to %i", 
base->so_rcvbuf);
+                       err = -SO_RCVBUF;
+                       goto out2;
+               }
+       }
+       if (base->so_sndbuf) {
+               if (setsockopt(ns->socket, SOL_SOCKET, SO_SNDBUF,
+                   (void *)&base->so_sndbuf, sizeof(base->so_sndbuf))) {
+                       log(EVDNS_LOG_WARN, "Couldn't set SO_SNDBUF to %i", 
base->so_sndbuf);
+                       err = -SO_SNDBUF;
+                       goto out2;
+               }
+       }
+
        memcpy(&ns->address, address, addrlen);
        ns->addrlen = addrlen;
        ns->state = 1;
@@ -3531,6 +3552,16 @@
                    val);
                memcpy(&base->global_nameserver_probe_initial_timeout, &tv,
                    sizeof(tv));
+       } else if (str_matches_option(option, "so-rcvbuf:")) {
+               int buf = strtoint(val);
+               if (!(flags & DNS_OPTION_MISC)) return 0;
+               log(EVDNS_LOG_DEBUG, "Setting SO_RCVBUF to %s", val);
+               base->so_rcvbuf = buf;
+       } else if (str_matches_option(option, "so-sndbuf:")) {
+               int buf = strtoint(val);
+               if (!(flags & DNS_OPTION_MISC)) return 0;
+               log(EVDNS_LOG_DEBUG, "Setting SO_SNDBUF to %s", val);
+               base->so_sndbuf = buf;
        }
        return 0;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/event.c new/libevent-2.1.11-stable/event.c
--- old/libevent-2.1.10-stable/event.c  2019-05-25 23:15:35.000000000 +0200
+++ new/libevent-2.1.11-stable/event.c  2019-08-01 23:09:13.000000000 +0200
@@ -837,8 +837,7 @@
 static void
 event_base_free_(struct event_base *base, int run_finalizers)
 {
-       int i;
-       size_t n_deleted=0;
+       int i, n_deleted=0;
        struct event *ev;
        /* XXXX grab the lock? If there is contention when one thread frees
         * the base, then the contending thread will be very sad soon. */
@@ -913,7 +912,7 @@
        }
 
        if (n_deleted)
-               event_debug(("%s: "EV_SIZE_FMT" events were still set in base",
+               event_debug(("%s: %d events were still set in base",
                        __func__, n_deleted));
 
        while (LIST_FIRST(&base->once_events)) {
@@ -988,6 +987,12 @@
 
        EVBASE_ACQUIRE_LOCK(base, th_base_lock);
 
+       if (base->running_loop) {
+               event_warnx("%s: forked from the event_loop.", __func__);
+               res = -1;
+               goto done;
+       }
+
        evsel = base->evsel;
 
        /* check if this event mechanism requires reinit on the backend */
@@ -3679,7 +3684,7 @@
     event_base_foreach_event_cb fn, void *arg)
 {
        int r, i;
-       size_t u;
+       unsigned u;
        struct event *ev;
 
        /* Start out with all the EVLIST_INSERTED events. */
@@ -3832,7 +3837,7 @@
                /* If we want to activate timer events, loop and activate each 
event with
                 * the same fd in both the timeheap and common timeouts list */
                int i;
-               size_t u;
+               unsigned u;
                struct event *ev;
 
                for (u = 0; u < base->timeheap.n; ++u) {
@@ -3962,21 +3967,20 @@
 event_base_assert_ok_nolock_(struct event_base *base)
 {
        int i;
-       size_t u;
        int count;
 
        /* First do checks on the per-fd and per-signal lists */
        evmap_check_integrity_(base);
 
        /* Check the heap property */
-       for (u = 1; u < base->timeheap.n; ++u) {
-               size_t parent = (u - 1) / 2;
+       for (i = 1; i < (int)base->timeheap.n; ++i) {
+               int parent = (i - 1) / 2;
                struct event *ev, *p_ev;
-               ev = base->timeheap.p[u];
+               ev = base->timeheap.p[i];
                p_ev = base->timeheap.p[parent];
                EVUTIL_ASSERT(ev->ev_flags & EVLIST_TIMEOUT);
                EVUTIL_ASSERT(evutil_timercmp(&p_ev->ev_timeout, 
&ev->ev_timeout, <=));
-               EVUTIL_ASSERT(ev->ev_timeout_pos.min_heap_idx == u);
+               EVUTIL_ASSERT(ev->ev_timeout_pos.min_heap_idx == i);
        }
 
        /* Check that the common timeouts are fine */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/evutil.c new/libevent-2.1.11-stable/evutil.c
--- old/libevent-2.1.10-stable/evutil.c 2019-02-03 22:30:49.000000000 +0100
+++ new/libevent-2.1.11-stable/evutil.c 2019-08-01 23:09:13.000000000 +0200
@@ -29,6 +29,7 @@
 
 #ifdef _WIN32
 #include <winsock2.h>
+#include <winerror.h>
 #include <ws2tcpip.h>
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
@@ -750,7 +751,7 @@
 /* Test whether we have an ipv4 interface and an ipv6 interface.  Return 0 if
  * the test seemed successful. */
 static int
-evutil_check_interfaces(int force_recheck)
+evutil_check_interfaces(void)
 {
        evutil_socket_t fd = -1;
        struct sockaddr_in sin, sin_out;
@@ -758,9 +759,12 @@
        ev_socklen_t sin_out_len = sizeof(sin_out);
        ev_socklen_t sin6_out_len = sizeof(sin6_out);
        int r;
-       if (have_checked_interfaces && !force_recheck)
+       if (have_checked_interfaces)
                return 0;
 
+       /* From this point on we have done the ipv4/ipv6 interface check */
+       have_checked_interfaces = 1;
+
        if (evutil_check_ifaddrs() == 0) {
                /* Use a nice sane interface, if this system has one. */
                return 0;
@@ -1228,8 +1232,7 @@
                return;
        if (hints->ai_family != PF_UNSPEC)
                return;
-       if (!have_checked_interfaces)
-               evutil_check_interfaces(0);
+       evutil_check_interfaces();
        if (had_ipv4_address && !had_ipv6_address) {
                hints->ai_family = PF_INET;
        } else if (!had_ipv4_address && had_ipv6_address) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/include/event2/buffer_compat.h 
new/libevent-2.1.11-stable/include/event2/buffer_compat.h
--- old/libevent-2.1.10-stable/include/event2/buffer_compat.h   2016-10-04 
21:55:31.000000000 +0200
+++ new/libevent-2.1.11-stable/include/event2/buffer_compat.h   2019-08-01 
23:09:13.000000000 +0200
@@ -90,9 +90,10 @@
   @param cb the callback function to invoke when the evbuffer is modified,
         or NULL to remove all callbacks.
   @param cbarg an argument to be provided to the callback function
+  @return 0 if successful, or -1 on error
  */
 EVENT2_EXPORT_SYMBOL
-void evbuffer_setcb(struct evbuffer *buffer, evbuffer_cb cb, void *cbarg);
+int evbuffer_setcb(struct evbuffer *buffer, evbuffer_cb cb, void *cbarg);
 
 
 /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/include/event2/bufferevent.h 
new/libevent-2.1.11-stable/include/event2/bufferevent.h
--- old/libevent-2.1.10-stable/include/event2/bufferevent.h     2019-05-25 
21:38:04.000000000 +0200
+++ new/libevent-2.1.11-stable/include/event2/bufferevent.h     2019-08-01 
23:09:13.000000000 +0200
@@ -491,7 +491,7 @@
 
   (In other words, if reading or writing is disabled, or if the
   bufferevent's read or write operation has been suspended because
-  there's no data to write, or not enough banwidth, or so on, the
+  there's no data to write, or not enough bandwidth, or so on, the
   timeout isn't active.  The timeout only becomes active when we we're
   willing to actually read or write.)
 
@@ -569,7 +569,7 @@
 /**
  * Public interface to manually increase the reference count of a bufferevent
  * this is useful in situations where a user may reference the bufferevent
- * somewhere eles (unknown to libevent)
+ * somewhere else (unknown to libevent)
  *
  * @param bufev the bufferevent to increase the refcount on
  *
@@ -802,7 +802,7 @@
    They are: socket-based bufferevents (normal and IOCP-based), and SSL-based
    bufferevents.
 
-   Return 0 on sucess, -1 on failure.
+   Return 0 on success, -1 on failure.
  */
 EVENT2_EXPORT_SYMBOL
 int bufferevent_set_rate_limit(struct bufferevent *bev,
@@ -853,7 +853,7 @@
 
    The default min-share is currently 64 bytes.
 
-   Returns 0 on success, -1 on faulre.
+   Returns 0 on success, -1 on failure.
  */
 EVENT2_EXPORT_SYMBOL
 int bufferevent_rate_limit_group_set_min_share(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/include/event2/dns.h 
new/libevent-2.1.11-stable/include/event2/dns.h
--- old/libevent-2.1.10-stable/include/event2/dns.h     2019-05-25 
23:15:35.000000000 +0200
+++ new/libevent-2.1.11-stable/include/event2/dns.h     2019-08-01 
23:09:13.000000000 +0200
@@ -455,7 +455,8 @@
   The currently available configuration options are:
 
     ndots, timeout, max-timeouts, max-inflight, attempts, randomize-case,
-    bind-to, initial-probe-timeout, getaddrinfo-allow-skew.
+    bind-to, initial-probe-timeout, getaddrinfo-allow-skew,
+    so-rcvbuf, so-sndbuf.
 
   In versions before Libevent 2.0.3-alpha, the option name needed to end with
   a colon.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/include/event2/event.h 
new/libevent-2.1.11-stable/include/event2/event.h
--- old/libevent-2.1.10-stable/include/event2/event.h   2019-05-25 
23:15:35.000000000 +0200
+++ new/libevent-2.1.11-stable/include/event2/event.h   2019-08-01 
23:09:13.000000000 +0200
@@ -285,7 +285,7 @@
  * There are many options that can be used to alter the behavior and
  * implementation of an event_base.  To avoid having to pass them all in a
  * complex many-argument constructor, we provide an abstract data type
- * where you set up configation information before passing it to
+ * where you set up configuration information before passing it to
  * event_base_new_with_config().
  *
  * @see event_config_new(), event_config_free(), event_base_new_with_config(),
@@ -632,7 +632,7 @@
 /**
  * Record an interval and/or a number of callbacks after which the event base
  * should check for new events.  By default, the event base will run as many
- * events are as activated at the higest activated priority before checking
+ * events are as activated at the highest activated priority before checking
  * for new events.  If you configure it by setting max_interval, it will check
  * the time after each callback, and not allow more than max_interval to
  * elapse before checking for new events.  If you configure it by setting
@@ -1321,7 +1321,7 @@
   The event_initialized() function can be used to check if an event has been
   initialized.
 
-  Warning: This function is only useful for distinguishing a a zeroed-out
+  Warning: This function is only useful for distinguishing a zeroed-out
     piece of memory from an initialized event, it can easily be confused by
     uninitialized memory.  Thus, it should ONLY be used to distinguish an
     initialized event from zero.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/include/event2/event_struct.h 
new/libevent-2.1.11-stable/include/event2/event_struct.h
--- old/libevent-2.1.10-stable/include/event2/event_struct.h    2019-05-25 
23:15:35.000000000 +0200
+++ new/libevent-2.1.11-stable/include/event2/event_struct.h    2019-01-12 
19:39:07.000000000 +0100
@@ -126,7 +126,7 @@
        /* for managing timeouts */
        union {
                TAILQ_ENTRY(event) ev_next_with_common_timeout;
-               size_t min_heap_idx;
+               int min_heap_idx;
        } ev_timeout_pos;
        evutil_socket_t ev_fd;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/include/include.am 
new/libevent-2.1.11-stable/include/include.am
--- old/libevent-2.1.10-stable/include/include.am       2019-05-25 
21:38:04.000000000 +0200
+++ new/libevent-2.1.11-stable/include/include.am       2019-08-01 
23:09:13.000000000 +0200
@@ -1,4 +1,4 @@
-# include/Makefile.am for libevent
+# include/include.am for libevent
 # Copyright 2000-2007 Niels Provos
 # Copyright 2007-2012 Niels Provos and Nick Mathewson
 #
@@ -11,7 +11,6 @@
        include/event2/buffer_compat.h \
        include/event2/bufferevent.h \
        include/event2/bufferevent_compat.h \
-       include/event2/bufferevent_ssl.h \
        include/event2/bufferevent_struct.h \
        include/event2/dns.h \
        include/event2/dns_compat.h \
@@ -33,6 +32,10 @@
        include/event2/util.h \
        include/event2/visibility.h
 
+if OPENSSL
+EVENT2_EXPORT += include/event2/bufferevent_ssl.h
+endif
+
 ## Without the nobase_ prefixing, Automake would strip "include/event2/" from
 ## the source header filename to derive the installed header filename.
 ## With nobase_ the installed path is $(includedir)/include/event2/ev*.h.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/listener.c new/libevent-2.1.11-stable/listener.c
--- old/libevent-2.1.10-stable/listener.c       2019-02-03 22:30:49.000000000 
+0100
+++ new/libevent-2.1.11-stable/listener.c       2019-08-01 23:09:13.000000000 
+0200
@@ -35,6 +35,7 @@
 #define _WIN32_WINNT 0x0403
 #endif
 #include <winsock2.h>
+#include <winerror.h>
 #include <ws2tcpip.h>
 #include <mswsock.h>
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/m4/libevent_openssl.m4 
new/libevent-2.1.11-stable/m4/libevent_openssl.m4
--- old/libevent-2.1.10-stable/m4/libevent_openssl.m4   2017-09-25 
10:39:28.000000000 +0200
+++ new/libevent-2.1.11-stable/m4/libevent_openssl.m4   2019-08-01 
23:09:13.000000000 +0200
@@ -40,7 +40,7 @@
        ;;
     esac
     CPPFLAGS_SAVE=$CPPFLAGS
-    CPPFLAGS+=$OPENSSL_INCS
+    CPPFLAGS="$CPPFLAGS $OPENSSL_INCS"
     AC_CHECK_HEADERS([openssl/ssl.h], [], [have_openssl=no])
     CPPFLAGS=$CPPFLAGS_SAVE
     AC_SUBST(OPENSSL_INCS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/minheap-internal.h 
new/libevent-2.1.11-stable/minheap-internal.h
--- old/libevent-2.1.10-stable/minheap-internal.h       2019-05-25 
23:15:35.000000000 +0200
+++ new/libevent-2.1.11-stable/minheap-internal.h       2019-07-31 
20:28:32.000000000 +0200
@@ -39,7 +39,7 @@
 typedef struct min_heap
 {
        struct event** p;
-       size_t n, a;
+       unsigned n, a;
 } min_heap_t;
 
 static inline void          min_heap_ctor_(min_heap_t* s);
@@ -47,30 +47,30 @@
 static inline void          min_heap_elem_init_(struct event* e);
 static inline int           min_heap_elt_is_top_(const struct event *e);
 static inline int           min_heap_empty_(min_heap_t* s);
-static inline size_t        min_heap_size_(min_heap_t* s);
+static inline unsigned      min_heap_size_(min_heap_t* s);
 static inline struct event*  min_heap_top_(min_heap_t* s);
-static inline int           min_heap_reserve_(min_heap_t* s, size_t n);
+static inline int           min_heap_reserve_(min_heap_t* s, unsigned n);
 static inline int           min_heap_push_(min_heap_t* s, struct event* e);
 static inline struct event*  min_heap_pop_(min_heap_t* s);
 static inline int           min_heap_adjust_(min_heap_t *s, struct event* e);
 static inline int           min_heap_erase_(min_heap_t* s, struct event* e);
-static inline void          min_heap_shift_up_(min_heap_t* s, size_t 
hole_index, struct event* e);
-static inline void          min_heap_shift_up_unconditional_(min_heap_t* s, 
size_t hole_index, struct event* e);
-static inline void          min_heap_shift_down_(min_heap_t* s, size_t 
hole_index, struct event* e);
+static inline void          min_heap_shift_up_(min_heap_t* s, unsigned 
hole_index, struct event* e);
+static inline void          min_heap_shift_up_unconditional_(min_heap_t* s, 
unsigned hole_index, struct event* e);
+static inline void          min_heap_shift_down_(min_heap_t* s, unsigned 
hole_index, struct event* e);
 
 #define min_heap_elem_greater(a, b) \
        (evutil_timercmp(&(a)->ev_timeout, &(b)->ev_timeout, >))
 
 void min_heap_ctor_(min_heap_t* s) { s->p = 0; s->n = 0; s->a = 0; }
 void min_heap_dtor_(min_heap_t* s) { if (s->p) mm_free(s->p); }
-void min_heap_elem_init_(struct event* e) { e->ev_timeout_pos.min_heap_idx = 
EV_SIZE_MAX; }
-int min_heap_empty_(min_heap_t* s) { return 0 == s->n; }
-size_t min_heap_size_(min_heap_t* s) { return s->n; }
+void min_heap_elem_init_(struct event* e) { e->ev_timeout_pos.min_heap_idx = 
-1; }
+int min_heap_empty_(min_heap_t* s) { return 0u == s->n; }
+unsigned min_heap_size_(min_heap_t* s) { return s->n; }
 struct event* min_heap_top_(min_heap_t* s) { return s->n ? *s->p : 0; }
 
 int min_heap_push_(min_heap_t* s, struct event* e)
 {
-       if (min_heap_reserve_(s, s->n + 1))
+       if (s->n == UINT32_MAX || min_heap_reserve_(s, s->n + 1))
                return -1;
        min_heap_shift_up_(s, s->n++, e);
        return 0;
@@ -81,8 +81,8 @@
        if (s->n)
        {
                struct event* e = *s->p;
-               min_heap_shift_down_(s, 0, s->p[--s->n]);
-               e->ev_timeout_pos.min_heap_idx = EV_SIZE_MAX;
+               min_heap_shift_down_(s, 0u, s->p[--s->n]);
+               e->ev_timeout_pos.min_heap_idx = -1;
                return e;
        }
        return 0;
@@ -95,10 +95,10 @@
 
 int min_heap_erase_(min_heap_t* s, struct event* e)
 {
-       if (EV_SIZE_MAX != e->ev_timeout_pos.min_heap_idx)
+       if (-1 != e->ev_timeout_pos.min_heap_idx)
        {
                struct event *last = s->p[--s->n];
-               size_t parent = (e->ev_timeout_pos.min_heap_idx - 1) / 2;
+               unsigned parent = (e->ev_timeout_pos.min_heap_idx - 1) / 2;
                /* we replace e with the last element in the heap.  We might 
need to
                   shift it upward if it is less than its parent, or downward 
if it is
                   greater than one or both its children. Since the children 
are known
@@ -108,7 +108,7 @@
                        min_heap_shift_up_unconditional_(s, 
e->ev_timeout_pos.min_heap_idx, last);
                else
                        min_heap_shift_down_(s, e->ev_timeout_pos.min_heap_idx, 
last);
-               e->ev_timeout_pos.min_heap_idx = EV_SIZE_MAX;
+               e->ev_timeout_pos.min_heap_idx = -1;
                return 0;
        }
        return -1;
@@ -116,10 +116,10 @@
 
 int min_heap_adjust_(min_heap_t *s, struct event *e)
 {
-       if (EV_SIZE_MAX == e->ev_timeout_pos.min_heap_idx) {
+       if (-1 == e->ev_timeout_pos.min_heap_idx) {
                return min_heap_push_(s, e);
        } else {
-               size_t parent = (e->ev_timeout_pos.min_heap_idx - 1) / 2;
+               unsigned parent = (e->ev_timeout_pos.min_heap_idx - 1) / 2;
                /* The position of e has changed; we shift it up or down
                 * as needed.  We can't need to do both. */
                if (e->ev_timeout_pos.min_heap_idx > 0 && 
min_heap_elem_greater(s->p[parent], e))
@@ -130,14 +130,18 @@
        }
 }
 
-int min_heap_reserve_(min_heap_t* s, size_t n)
+int min_heap_reserve_(min_heap_t* s, unsigned n)
 {
        if (s->a < n)
        {
                struct event** p;
-               size_t a = s->a ? s->a * 2 : 8;
+               unsigned a = s->a ? s->a * 2 : 8;
                if (a < n)
                        a = n;
+#if (SIZE_MAX == UINT32_MAX)
+               if (a > SIZE_MAX / sizeof *p)
+                       return -1;
+#endif
                if (!(p = (struct event**)mm_realloc(s->p, a * sizeof *p)))
                        return -1;
                s->p = p;
@@ -146,9 +150,9 @@
        return 0;
 }
 
-void min_heap_shift_up_unconditional_(min_heap_t* s, size_t hole_index, struct 
event* e)
+void min_heap_shift_up_unconditional_(min_heap_t* s, unsigned hole_index, 
struct event* e)
 {
-    size_t parent = (hole_index - 1) / 2;
+    unsigned parent = (hole_index - 1) / 2;
     do
     {
        (s->p[hole_index] = s->p[parent])->ev_timeout_pos.min_heap_idx = 
hole_index;
@@ -158,9 +162,9 @@
     (s->p[hole_index] = e)->ev_timeout_pos.min_heap_idx = hole_index;
 }
 
-void min_heap_shift_up_(min_heap_t* s, size_t hole_index, struct event* e)
+void min_heap_shift_up_(min_heap_t* s, unsigned hole_index, struct event* e)
 {
-    size_t parent = (hole_index - 1) / 2;
+    unsigned parent = (hole_index - 1) / 2;
     while (hole_index && min_heap_elem_greater(s->p[parent], e))
     {
        (s->p[hole_index] = s->p[parent])->ev_timeout_pos.min_heap_idx = 
hole_index;
@@ -170,9 +174,9 @@
     (s->p[hole_index] = e)->ev_timeout_pos.min_heap_idx = hole_index;
 }
 
-void min_heap_shift_down_(min_heap_t* s, size_t hole_index, struct event* e)
+void min_heap_shift_down_(min_heap_t* s, unsigned hole_index, struct event* e)
 {
-    size_t min_child = 2 * (hole_index + 1);
+    unsigned min_child = 2 * (hole_index + 1);
     while (min_child <= s->n)
        {
        min_child -= min_child == s->n || 
min_heap_elem_greater(s->p[min_child], s->p[min_child - 1]);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/sample/https-client.c 
new/libevent-2.1.11-stable/sample/https-client.c
--- old/libevent-2.1.10-stable/sample/https-client.c    2019-05-25 
23:15:35.000000000 +0200
+++ new/libevent-2.1.11-stable/sample/https-client.c    2019-08-01 
23:09:13.000000000 +0200
@@ -53,7 +53,7 @@
        char buffer[256];
        int nread;
 
-       if (req == NULL) {
+       if (!req || !evhttp_request_get_response_code(req)) {
                /* If req is NULL, it means an error occurred, but
                 * sadly we are mostly left guessing what the error
                 * might have been.  We'll do our best... */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/test/regress_buffer.c 
new/libevent-2.1.11-stable/test/regress_buffer.c
--- old/libevent-2.1.10-stable/test/regress_buffer.c    2019-05-25 
23:15:35.000000000 +0200
+++ new/libevent-2.1.11-stable/test/regress_buffer.c    2019-08-01 
23:09:13.000000000 +0200
@@ -1956,12 +1956,12 @@
        tt_assert(cb1 != NULL);
        cb2 = evbuffer_add_cb(buf, log_change_callback, buf_out2);
        tt_assert(cb2 != NULL);
-       evbuffer_setcb(buf, self_draining_callback, NULL);
+       tt_int_op(evbuffer_setcb(buf, self_draining_callback, NULL), ==, 0);
        evbuffer_add_printf(buf, "This should get drained right away.");
        tt_uint_op(evbuffer_get_length(buf), ==, 0);
        tt_uint_op(evbuffer_get_length(buf_out1), ==, 0);
        tt_uint_op(evbuffer_get_length(buf_out2), ==, 0);
-       evbuffer_setcb(buf, NULL, NULL);
+       tt_int_op(evbuffer_setcb(buf, NULL, NULL), ==, 0);
        evbuffer_add_printf(buf, "This will not.");
        tt_str_op((const char *) evbuffer_pullup(buf, -1), ==, "This will 
not.");
        evbuffer_validate(buf);
@@ -1987,6 +1987,14 @@
                  "0->15; 15->11; 11->0; ");
 #endif
 
+       /* the next call to readline should fail */
+#ifndef EVENT__DISABLE_MM_REPLACEMENT
+       event_set_mem_functions(failing_malloc, realloc, free);
+       tt_int_op(evbuffer_setcb(buf, self_draining_callback, NULL), ==, -1);
+       evbuffer_validate(buf);
+       event_set_mem_functions(malloc, realloc, free);
+#endif
+
  end:
        if (buf)
                evbuffer_free(buf);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/test/regress_dns.c 
new/libevent-2.1.11-stable/test/regress_dns.c
--- old/libevent-2.1.10-stable/test/regress_dns.c       2019-05-25 
23:15:35.000000000 +0200
+++ new/libevent-2.1.11-stable/test/regress_dns.c       2019-08-01 
23:09:13.000000000 +0200
@@ -2352,6 +2352,26 @@
 }
 #endif
 
+static void
+test_set_so_rcvbuf_so_sndbuf(void *arg)
+{
+       struct basic_test_data *data = arg;
+       struct evdns_base *dns_base;
+
+       dns_base = evdns_base_new(data->base, 0);
+       tt_assert(dns_base);
+
+       tt_assert(!evdns_base_set_option(dns_base, "so-rcvbuf", "10240"));
+       tt_assert(!evdns_base_set_option(dns_base, "so-sndbuf", "10240"));
+
+       /* actually check SO_RCVBUF/SO_SNDBUF not fails */
+       tt_assert(!evdns_base_nameserver_ip_add(dns_base, "127.0.0.1"));
+
+end:
+       if (dns_base)
+               evdns_base_free(dns_base, 0);
+}
+
 #define DNS_LEGACY(name, flags)                                               \
        { #name, run_legacy_test_fn, flags|TT_LEGACY, &legacy_setup,   \
                    dns_##name }
@@ -2421,6 +2441,9 @@
          TT_FORK|TT_OFF_BY_DEFAULT, NULL, NULL },
 #endif
 
+       { "set_SO_RCVBUF_SO_SNDBUF", test_set_so_rcvbuf_so_sndbuf,
+         TT_FORK|TT_NEED_BASE, &basic_setup, NULL },
+
        END_OF_TESTCASES
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libevent-2.1.10-stable/util-internal.h 
new/libevent-2.1.11-stable/util-internal.h
--- old/libevent-2.1.10-stable/util-internal.h  2019-02-03 22:30:49.000000000 
+0100
+++ new/libevent-2.1.11-stable/util-internal.h  2019-08-01 23:09:13.000000000 
+0200
@@ -52,16 +52,22 @@
 
 /* __has_attribute() wrapper */
 #ifdef __has_attribute
-#define EVUTIL_HAS_ATTRIBUTE __has_attribute
+# define EVUTIL_HAS_ATTRIBUTE __has_attribute
 #endif
 /** clang 3 __has_attribute misbehaves in some versions */
-#if defined(__clang__) && \
-       __clang__ == 1 && __clang_major__ == 3 && \
-       (__clang_minor__ >= 2 && __clang_minor__ <= 5)
-#undef EVUTIL_HAS_ATTRIBUTE
-#endif
+#if defined(__clang__) && __clang__ == 1
+# if defined(__apple_build_version__)
+#  if __clang_major__ <= 6
+#   undef EVUTIL_HAS_ATTRIBUTE
+#  endif
+# else /* !__apple_build_version__ */
+#  if __clang_major__ == 3 && __clang_minor__ >= 2 && __clang_minor__ <= 5
+#   undef EVUTIL_HAS_ATTRIBUTE
+#  endif
+# endif /* __apple_build_version__ */
+#endif /*\ defined(__clang__) && __clang__ == 1 */
 #ifndef EVUTIL_HAS_ATTRIBUTE
-#define EVUTIL_HAS_ATTRIBUTE(x) 0
+# define EVUTIL_HAS_ATTRIBUTE(x) 0
 #endif
 
 /* If we need magic to say "inline", get it for free internally. */



Reply via email to