Skip to content

Commit

Permalink
build: Avoid getrandom@GLIBC_2.25 symbol in libevent package
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Jun 23, 2021
1 parent c93e123 commit a4b0b34
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions depends/packages/libevent.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ $(package)_version=2.1.12-stable
$(package)_download_path=https://github.com/libevent/libevent/releases/download/release-$($(package)_version)/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb
$(package)_patches = glibc_compatibility.patch

# When building for Windows, we set _WIN32_WINNT to target the same Windows
# version as we do in configure. Due to quirks in libevents build system, this
Expand All @@ -16,6 +17,10 @@ define $(package)_set_vars
$(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0601
endef

define $(package)_preprocess_cmds
patch -p1 -i $($(package)_patch_dir)/glibc_compatibility.patch
endef

define $(package)_config_cmds
$($(package)_autoconf)
endef
Expand Down
14 changes: 14 additions & 0 deletions depends/patches/libevent/glibc_compatibility.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Avoid getrandom@GLIBC_2.25 symbol.

--- old/config.h.in
+++ new/config.h.in
@@ -101,9 +101,6 @@
/* Define to 1 if you have the `getprotobynumber' function. */
#undef HAVE_GETPROTOBYNUMBER

-/* Define to 1 if you have the `getrandom' function. */
-#undef HAVE_GETRANDOM
-
/* Define to 1 if you have the `getservbyname' function. */
#undef HAVE_GETSERVBYNAME

0 comments on commit a4b0b34

Please sign in to comment.